This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33541] gfortran wrongly imports renamed-use-associated symbol unrenamed
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2007 12:20:17 -0000
- Subject: [Bug fortran/33541] gfortran wrongly imports renamed-use-associated symbol unrenamed
- References: <bug-33541-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from burnus at gcc dot gnu dot org 2007-11-24 12:20 -------
I think the failures in test3 are ok. Example program:
module m
integer :: a = 10
end module m
program p
integer :: a
a = 5
call s()
contains
subroutine s()
use m, local1 => a
use m
print *, local1, a
end subroutine
end program p
This prints "10 10" with g95 and "10 5" with the patched gfortran, NAG f95,
ifort, sunf95 and openf95. Actually, g95 shows the bug with this PR fixes:
(3) The identifier of the entity in the referenced module if
that identifier does not appear as a use-name or
use-defined-operator in any rename for that module.
(see comment 0 for the full quote). That is: "a" is not imported from the
module as "a" as it is already imported as "local1".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33541