public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/25252]  New: ICE on invalid code
@ 2005-12-04 19:25 uttamp at us dot ibm dot com
  2005-12-10 20:30 ` [Bug fortran/25252] " eedelman at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-12-04 19:25 UTC (permalink / raw)
  To: gcc-bugs

Hi,
Following invalid code (association stmt sint=>sreal) causes an ICE.

$ cat test.f90
       MODULE gswap
         TYPE points
           REAL :: x, y
         END TYPE points
         INTERFACE swap
           MODULE PROCEDURE sreal, schar, sint => sreal
         END INTERFACE swap
       CONTAINS
         SUBROUTINE sreal(a,b)
           real, intent(inout) :: a,b
           real :: temp
           temp=a
           a=b
           b=temp
         END SUBROUTINE sreal
       END MODULE gswap
       program test_swap
       USE gswap
       integer :: i = 2,  j=3
       call swap(i,j)
       end program test_swap

$ gfortran test.f90
 In file test.f90:6

           MODULE PROCEDURE sreal, schar, sint => sreal
                                             1
Error: Syntax error in MODULE PROCEDURE statement at (1)
test.f90:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

gdb output

(gdb) r 
Program received signal SIGSEGV, Segmentation fault.
0x1001c2d8 in show_locus (offset=0, loc=0x10773018)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/error.c:137
137       error_printf ("In file %s:%d\n", f->filename,

(gdb) bt
#0  0x1001c2d8 in show_locus (offset=0, loc=0x10773018)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/error.c:137
#1  0x1001c4c4 in show_loci (l1=Variable "l1" is not available.
)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/error.c:270
#2  0x22000442 in ?? ()
#3  0x1001b9a4 in error_print (type=0x1054d4b4 "Error:",
    format0=0x1054e254 "Procedure '%s' in %s at %L is neither function nor
subroutine", argp=Variable "argp" is not available.
)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/error.c:381
#4  0x1001bd30 in gfc_error (
    nocmsgid=0x1054e254 "Procedure '%s' in %s at %L is neither function nor
subroutine") at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/error.c:595
#5  0x1001fd88 in check_interface0 (p=Variable "p" is not available.
)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/interface.c:880
#6  0x10022134 in check_sym_interfaces (sym=0x10772bb8)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/interface.c:960
#7  0x1005ba50 in traverse_ns (st=0x10772b98,
    func=0x100220b0 <check_sym_interfaces>)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/symbol.c:2416
#8  0x10021c20 in gfc_check_interfaces (ns=0x107726c0)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/interface.c:1015
#9  0x28000422 in ?? ()
#10 0x10050af4 in gfc_resolve (ns=0x107726c0)
---Type <return> to continue, or q <return> to quit---
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/resolve.c:5436
#11 0x24000482 in ?? ()
#12 0x10046aa4 in gfc_parse_file ()
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/parse.c:2659
#13 0x10066c04 in gfc_be_parse_file (set_yydebug=Variable "set_yydebug" is not
available.
)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/fortran/f95-lang.c:286
#14 0x1034584c in toplev_main (argc=Variable "argc" is not available.
)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/toplev.c:990
#15 0x10093900 in main (argc=Variable "argc" is not available.
)
    at /home/gccbuild/gcc_trunk_anonsvn/trunk/gcc/main.c:35
(gdb)


-- 
           Summary: ICE on invalid code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uttamp at us dot ibm dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


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


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

end of thread, other threads:[~2007-11-20  5:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
2005-12-10 20:30 ` [Bug fortran/25252] " eedelman at gcc dot gnu dot org
2006-01-03 16:25 ` dje at gcc dot gnu dot org
2006-08-29 21:39 ` kargl at gcc dot gnu dot org
2006-09-16 20:06 ` pault at gcc dot gnu dot org
2007-02-15 20:51 ` kargl at gcc dot gnu dot org
2007-02-15 21:43 ` dominiq at lps dot ens dot fr
2007-03-10 22:15 ` reichelt at gcc dot gnu dot org
2007-05-13 22:36 ` jvdelisle at gcc dot gnu dot org
2007-05-18 20:27 ` reichelt at gcc dot gnu dot org
2007-05-21 19:16 ` dfranke at gcc dot gnu dot org
2007-06-02  8:30 ` jvdelisle at gcc dot gnu dot org
2007-06-07 22:56 ` reichelt at gcc dot gnu dot org
2007-06-08  0:46 ` jvdelisle at gcc dot gnu dot org
2007-11-02  9:55 ` reichelt at gcc dot gnu dot org
2007-11-02 13:18 ` jvdelisle at gcc dot gnu dot org
2007-11-10  0:53 ` fxcoudert at gcc dot gnu dot org
2007-11-17 16:55 ` fxcoudert at gcc dot gnu dot org
2007-11-17 17:50 ` fxcoudert at gcc dot gnu dot org
2007-11-17 17:54 ` fxcoudert at gcc dot gnu dot org
2007-11-20  5:03 ` patchapp at dberlin 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).