Showing results for 
Search instead for 
Did you mean: 

18.01 bug(??) when resolving in submodule structure

Hi there

this code

Module Mod_testmod
  Type :: test_type
    Procedure, Pass :: bla => Subbla
    Final :: SubFinalizer
  End type test_type
    Module Subroutine Subbla(this)
      Class(test_type), Intent(Inout) :: this
    end Subroutine
    Module Subroutine SubFinalizer(this)
      Type(test_type), Intent(Inout) :: this
    end Subroutine
  end interface
End Module Mod_testmod
SubModule(Mod_testmod) submod_testmod
  Module Procedure Subbla
    Implicit None
    write(*,*) "bla"
  End Procedure
  Module Procedure SubFinalizer
    Implicit None
    call this%bla()
  end procedure
end SubModule submod_testmod
Program Test
  use mod_testmod, only: test_type
  Implicit None
  Type(test_type) :: a
  call a%bla()
End Program Test

compiles with gfortran 7.2, ifort 17.05 and ifort 18.0, but with 18.01 it yields a compile time error:

/tmp/ifortaDf21e.o: In function `MAIN__':
Test.f90:(.text+0x88): undefined reference to `mod_testmod_mp_bla_'
/tmp/ifortaDf21e.o: In function `mod_testmod_mp_subfinalizer_':
Test.f90:(.text+0x16a): undefined reference to `mod_testmod_mp_bla_'

I presume that this is a bug, but a "black belt" may confirm.


0 Kudos
2 Replies
Valued Contributor III

Quote:may.ka wrote:

may.ka wrote:

.. a "black belt" may confirm.

I'm not a black belt and that might be partly why you never acknowledge my feedback ever any way ..

It's a bug and it is yet another illustration of a regression with SUBMODULEs in 18.0 update 1:

A workaround is to avoid the "=> procedure_name" syntax.



0 Kudos

Hi FortranFan,

Hi FortranFan,

I highly appreciate your contributions. I am just too lazy to write post containing only "Thank you".

Workaround is ok-ish but not applicable to large libraries. I prefer to wait for Intel to repair all that.


0 Kudos