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

* [Bug fortran/33550] ICE (segfault) when USEing ambiguous symbols
  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 ` fxcoudert at gcc dot gnu dot org
  2007-09-30 16:55 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-27 13:27 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-27 13:26:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33550


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

* [Bug fortran/33550] ICE (segfault) when USEing ambiguous symbols
  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
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-09-30 16:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2007-09-30 16:55 -------
Since I posted a fix, I had better take it!

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-09-27 13:26:54         |2007-09-30 16:55:35
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33550


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

* [Bug fortran/33550] ICE (segfault) when USEing ambiguous symbols
  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
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-10-02  7:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2007-10-02 07:53 -------
Subject: Bug 33550

Author: pault
Date: Tue Oct  2 07:53:05 2007
New Revision: 128949

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128949
Log:
2007-10-02  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/33550
        * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
        the name is a reference to an ambiguous symbol.

2007-10-02  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/33550
        * gfortran.dg/ambiguous_reference_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/ambiguous_reference_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33550


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

* [Bug fortran/33550] ICE (segfault) when USEing ambiguous symbols
  2007-09-25  6:20 [Bug fortran/33550] New: ICE (segfault) when USEing ambiguous symbols burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-10-02  7:53 ` pault at gcc dot gnu dot org
@ 2007-10-02  8:45 ` pault at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-10-02  8:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2007-10-02 08:45 -------
Fixed on trunk

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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).