public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33550]  New: ICE (segfault) when USEing ambiguous symbols
@ 2007-09-25  6:20 burnus at gcc dot gnu dot org
  2007-09-27 13:27 ` [Bug fortran/33550] " fxcoudert at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-09-25  6:20 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-02  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-25  6:20 [Bug fortran/33550] New: ICE (segfault) when USEing ambiguous symbols burnus at gcc dot gnu dot org
2007-09-27 13:27 ` [Bug fortran/33550] " fxcoudert at gcc dot gnu dot org
2007-09-30 16:55 ` pault at gcc dot gnu dot org
2007-10-02  7:53 ` pault at gcc dot gnu dot org
2007-10-02  8:45 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).