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
* [Bug fortran/25252] ICE on invalid code
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 ` eedelman at gcc dot gnu dot org
2006-01-03 16:25 ` dje at gcc dot gnu dot org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-12-10 20:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from eedelman at gcc dot gnu dot org 2005-12-10 20:30 -------
Confirmed.
--
eedelman at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-12-10 20:30:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
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
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-01-03 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dje at gcc dot gnu dot org 2006-01-03 16:25 -------
Not powerpc-specific.
--
dje at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
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
* [Bug fortran/25252] ICE on invalid code
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
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-08-29 21:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kargl at gcc dot gnu dot org 2006-08-29 21:39 -------
We no longer get an ICE with
GNU F95 version 4.2.0 20060828 (experimental) (x86_64-unknown-freebsd7.0)
gfortran -o z ji.f90
In file ji.f90:6
MODULE PROCEDURE sreal, schar, sint => sreal
1
Error: Syntax error in MODULE PROCEDURE statement at (1)
In file ji.f90:9
SUBROUTINE sreal(a,b)
1
Error: Procedure 'b' in generic interface 'swap' at (1) is neither function nor
subroutine
In file ji.f90:19
USE gswap
1
Fatal Error: Can't open module file 'gswap.mod' for reading at (1): No such
file or directory
Can we close this PR?
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (2 preceding siblings ...)
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
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-16 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-09-16 20:06 -------
GNU F95 version 4.2.0 20060916 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.2.0 20060916 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
In file pr25252.f90:6
MODULE PROCEDURE sreal, schar, sint => sreal
1
Error: Syntax error in MODULE PROCEDURE statement at (1)
pr25252.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.
I think not, Steve.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (3 preceding siblings ...)
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
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-02-15 20:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kargl at gcc dot gnu dot org 2007-02-15 20:50 -------
Does this still fail for others? I can't get the ICE to occur.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (4 preceding siblings ...)
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
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-02-15 21:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dominiq at lps dot ens dot fr 2007-02-15 21:43 -------
I have the ICE
pr25252.f90:6.46:
MODULE PROCEDURE sreal, schar, sint => sreal
1
Error: Syntax error in MODULE PROCEDURE statement at (1)
pr25252.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.
with
Using built-in specs.
Target: i386-pc-linux-gnu
Configured with: /home/fxcoudert/gfortran_nightbuild/trunk/configure
--prefix=/home/fxcoudert/gfortran_nightbuild/irun-20070209
--enable-languages=c,fortran --host=i386-pc-linux-gnu --enable-checking=release
--with-gmp=/home/fxcoudert/gfortran_nightbuild/software
Thread model: posix
gcc version 4.3.0 20070209 (experimental)
but not with
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/var/tmp/gfortran-20061231/irun
--enable-languages=c,fortran
--with-gmp=/var/tmp/gfortran-20061231/gfortran_libs
Thread model: posix
gcc version 4.3.0 20061231 (experimental)
nor with
Using built-in specs.
Target: powerpc-apple-darwin7
Configured with: ../gcc-4.3-20070210/configure --prefix=/sw
--prefix=/sw/lib/gcc4 --disable-multilib
--enable-languages=c,c++,fortran,objc,java --infodir=/sw/lib/gcc4/share/info
--with-gmp=/sw --with-included-gettext --build=powerpc-apple-darwin7
--host=powerpc-apple-darwin7 --with-as=/sw/lib/odcctools/bin/as
--with-ld=/sw/lib/odcctools/bin/ld --with-nm=/sw/lib/odcctools/bin/nm
--with-ar=/sw/lib/odcctools/bin/ar --with-strip=/sw/lib/odcctools/bin/strip
--with-ranlib=/sw/lib/odcctools/bin/ranlib
Thread model: posix
gcc version 4.3.0 20070209 (experimental)
and
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: ../gcc-4.2-20070124/configure --prefix=/sw
--prefix=/sw/lib/gcc4.2 --mandir=/sw/share/man --infodir=/sw/share/info
--enable-languages=c,c++,fortran,objc,java --host=powerpc-apple-darwin8
--with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld
--with-nm=/sw/lib/odcctools/bin/nm --with-gmp=/sw --with-libiconv-prefix=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
Thread model: posix
gcc version 4.2.0 20070124 (prerelease)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (5 preceding siblings ...)
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
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-10 22:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from reichelt at gcc dot gnu dot org 2007-03-10 22:15 -------
Here's a shorter testcase, that crashes since GCC 4.0.0 on i686-pc-linux-gnu:
=============================
module FOO
interface BAR
module procedure X, Y,
end interface BAR
end module
=============================
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (6 preceding siblings ...)
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
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-13 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2007-05-13 23:36 -------
I get no ice or segfault on the original test case nor the one in Comment #7.
I do get what looks like some garbled text on the second test case:
Error: Procedure '�,�' in generic interface 'bar' at (1) is
neither function nor subroutine
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (7 preceding siblings ...)
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
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-05-18 20:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from reichelt at gcc dot gnu dot org 2007-05-18 21:27 -------
Still crashes for me on mainline and 4.1 and 4.2 branch (i686-pc-linux-gnu).
Looks like there are some invalid pointers. Whether the program crashes or not
depends on the garbage they are pointing to.
This looks actually similar to PR 18923 where we also get crashes or garbled
names in error messages.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (8 preceding siblings ...)
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
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-21 19:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from dfranke at gcc dot gnu dot org 2007-05-21 20:16 -------
The testcase of comment #7 seen through valgrind:
pr25252.f90:3.26:
module procedure X, Y,
1
Error: Syntax error in MODULE PROCEDURE statement at (1)
==12169== Invalid read of size 2
==12169== at 0x80660ED: check_interface0 (interface.c:945)
==12169== Address 0x42121AA is 34 bytes inside a block of size 128 free'd
==12169== at 0x402119F: free (vg_replace_malloc.c:233)
==12169== by 0x80A4D9A: gfc_undo_symbols (symbol.c:2359)
[more to follow]
This is indeed similar to PR18923, as pointed out in comment #9.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (9 preceding siblings ...)
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
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-02 8:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2007-06-02 08:30 -------
I have a patch for PR18923 that also appears to fix this. Testing now. I
think this is a duplicate.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (10 preceding siblings ...)
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
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-06-07 22:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from reichelt at gcc dot gnu dot org 2007-06-07 22:56 -------
Although PR18923 is fixed now, this testcase (from comment#7) is still
crashing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (11 preceding siblings ...)
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
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-08 0:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jvdelisle at gcc dot gnu dot org 2007-06-08 00:46 -------
Yes, it turns out not to be a complete duplicate. I am still working on this
one.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (12 preceding siblings ...)
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
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-02 9:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from reichelt at gcc dot gnu dot org 2007-11-02 09:55 -------
The ICE disappeared on i686-pc-linux-gnu between 2007-08-15 and 2007-09-14.
Can anybody else reproduce the problem or can we close the PR?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (13 preceding siblings ...)
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
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-02 13:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jvdelisle at gcc dot gnu dot org 2007-11-02 13:18 -------
I still get segfault with the original case and garbled text on the case in
comment #7
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2006-01-27 20:44:57 |2007-11-02 13:18:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (14 preceding siblings ...)
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
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-10 0:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from fxcoudert at gcc dot gnu dot org 2007-11-10 00:53 -------
The following patch clears part of the problem, for example the following
testcase:
module g
interface i
module procedure sint => sreal
end interface i
end module g
More is needed, but I'm stuck. I've used valgrind, and I think we don't recover
well after gfc_match_modproc() exiting with MATCH_ERROR.
Index: decl.c
===================================================================
--- decl.c (revision 129869)
+++ decl.c (working copy)
@@ -5862,12 +5862,23 @@ gfc_match_modproc (void)
for (;;)
{
+ bool last = false;
+
m = gfc_match_name (name);
if (m == MATCH_NO)
goto syntax;
if (m != MATCH_YES)
return MATCH_ERROR;
+ /* Check for syntax error before starting to add symbols to the
+ current namespace. */
+ if (gfc_match_eos () == MATCH_YES)
+ last = true;
+ if (!last && gfc_match_char (',') != MATCH_YES)
+ goto syntax;
+
+ /* Now we're sure the syntax is valid, we process this item
+ further. */
if (gfc_get_symbol (name, module_ns, &sym))
return MATCH_ERROR;
@@ -5881,10 +5892,8 @@ gfc_match_modproc (void)
sym->attr.mod_proc = 1;
- if (gfc_match_eos () == MATCH_YES)
+ if (last)
break;
- if (gfc_match_char (',') != MATCH_YES)
- goto syntax;
}
return MATCH_YES;
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Last reconfirmed|2007-11-02 13:18:42 |2007-11-10 00:53:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (15 preceding siblings ...)
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
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-17 16:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from fxcoudert at gcc dot gnu dot org 2007-11-17 16:55 -------
Mine, I have posted a patch.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2007-
| |11/msg00949.html
Status|NEW |ASSIGNED
Keywords| |patch
Last reconfirmed|2007-11-10 00:53:08 |2007-11-17 16:55:21
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (16 preceding siblings ...)
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
19 siblings, 0 replies; 21+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-17 17:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from fxcoudert at gcc dot gnu dot org 2007-11-17 17:49 -------
Subject: Bug 25252
Author: fxcoudert
Date: Sat Nov 17 17:49:45 2007
New Revision: 130259
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130259
Log:
PR fortran/25252
* interface.c (gfc_current_interface_head,
gfc_set_current_interface_head): New functions.
* decl.c (gfc_match_modproc): Move check for syntax error earlier.
On syntax error, restore previous state of the interface.
* gfortran.h (gfc_current_interface_head,
gfc_set_current_interface_head): New prototypes.
* gfortran.dg/interface_22.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/interface_22.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/interface.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (17 preceding siblings ...)
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
19 siblings, 0 replies; 21+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-17 17:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from fxcoudert at gcc dot gnu dot org 2007-11-17 17:54 -------
Fixed.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25252
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/25252] ICE on invalid code
2005-12-04 19:25 [Bug regression/25252] New: ICE on invalid code uttamp at us dot ibm dot com
` (18 preceding siblings ...)
2007-11-17 17:54 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-20 5:03 ` patchapp at dberlin dot org
19 siblings, 0 replies; 21+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-20 5:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from patchapp at dberlin dot org 2007-11-20 05:03 -------
Subject: Bug number PR 25252
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00949.html
--
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).