------- Comment #24 from janus at gcc dot gnu dot org  2010-06-11 21:33 -------
Here is a somewhat modified version of comment #14, which compiles but produces
wrong code:

module mod1
  type :: t1
  contains
    procedure, nopass :: get => my_get
  end type
contains 
  subroutine my_get()
    print *,"my_get (mod1)"
  end subroutine
end module

module mod2
contains 
  subroutine my_get()   ! must have the same name as the function in mod1
    print *,"my_get (mod2)"
  end subroutine
end module

  use mod2
  use mod1              ! order of use statements is important
  type(t1) :: a
  call a%get()
end


Output is "my_get (mod2)" while it should be "my_get (mod1)".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42769

Reply via email to