This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33550] New: ICE (segfault) when USEing ambiguous symbols
- 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: 25 Sep 2007 06:20:12 -0000
- Subject: [Bug fortran/33550] New: ICE (segfault) when USEing ambiguous symbols
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/1abc1549a6a164f1/
by James Van Buskirk:
-------------------------
module M1
real x
end module M1
module M2
contains
subroutine y
end subroutine y
end module M2
module M3
use M2, x => y
end module M3
module M4
use M1
use M3
end module M4
module M5
use M4
end module M5
module M6
use M5
end module M6
program test
use M6
interface
function x(z)
end function x
end interface
write(*,*) 'Hello, world!'
end program test
function x(z)
x = z
end function x
-------------------------
g95:
In file a.f90:31
function x(z)
1
Error: Name 'x' at (1) is an ambiguous reference to 'x' from module 'm1'
NAG f95:
Error: a.f90, line 31: Symbol X resolves to X in module M1 and to Y in module
M2
detected at FUNCTION@X
Error: a.f90, line 31: Redeclaration of symbol Y from USEd module
detected at FUNCTION@X
Error: a.f90, line 31: Duplicate subprogram name Y
detected at FUNCTION@X
valgrind:
==7549== Conditional jump or move depends on uninitialised value(s)
==7549== at 0x416222: get_proc_name (decl.c:712)
==7549== by 0x4186DA: gfc_match_function_decl (decl.c:4054)
==7549== by 0x44EE4F: decode_statement (parse.c:116)
==7549== by 0x44FAE4: next_statement (parse.c:505)
==7549== by 0x451023: parse_spec (parse.c:1747)
==7549== by 0x4527B5: parse_progunit (parse.c:2965)
==7549== by 0x452C79: gfc_parse_file (parse.c:3271)
==7549== by 0x479C24: gfc_be_parse_file (f95-lang.c:258)
==7549== by 0x6D4B61: toplev_main (toplev.c:1039)
--
Summary: ICE (segfault) when USEing ambiguous symbols
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33550