------- Comment #2 from burnus at gcc dot gnu dot org 2008-11-11 15:25 ------- > Error: Name 'getnullset' at (1) is an ambiguous reference to > 'getnullset' from module 'pbit4set'
I have not yet checked the source, but other compilers give similar errors: * NAG f95: Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and in PBIT8SET detected at [EMAIL PROTECTED] Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and in PBIT8SET detected at [EMAIL PROTECTED] * g95: In file bug6M.f90:22 END MODULE Bug6 1 Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from module 'pbit4set' * ifort: bug6M.f90(17): error #6405: The same named entity from different modules and/or program units cannot be referenced. [GETNULLSET] CALL GetNullSet (search_set) * openf95: openf95-486 openf95: ERROR SUB_A, File = bug6M.f90, Line = 17, Column = 12 "GETNULLSET" has been use associated from module "PBIT4SET" and at least one more module. It must not be referenced. > The NAG, Intel and g95 compilers all compile this code. Hmm, not here! You have in bug6M.f90: USE PBit4Set USE PBit8Set That makes the following two getNullSet available: pure subroutine getNullSet (ANullSet) ! In pbit4setM.f90 type (TPBit4Set), intent(out) :: ANullSet pure subroutine getNullSet (ANullSet) ! In pbit8setM.f90 type (TPBit8Set), intent(out) :: ANullSet If you now call "getNullSet" you have a problem since getNullSet exists in both PBit4Set and PBit8Set. (Note: "getNullSet" is *not* a generic interface.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38066