[Bug fortran/38066] bug6 ambiguous reference
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Nov 11 15:26:00 GMT 2008
------- 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 CALL@GETNULLSET
Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and
in PBIT8SET detected at CALL@GETNULLSET
* 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
More information about the Gcc-bugs
mailing list