Bug 22458 - [3.4 regression] ICE on missing brace
[3.4 regression] ICE on missing brace
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: c
3.4.4
: P2 minor
: 3.4.5
Assigned To: rsandifo@gcc.gnu.org
http://gcc.gnu.org/ml/gcc-patches/200...
: error-recovery, ice-on-invalid-code, monitored, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-13 12:53 UTC by Volker Reichelt
Modified: 2005-08-08 07:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 3.3.3 4.0.0 4.1.0
Known to fail: 3.4.0
Last reconfirmed: 2005-07-29 07:25:11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2005-07-13 12:53:28 UTC
On the 3.4 branch I get a segfault for the following invalid code snippet:

=============================
void foo()
{
     __PRETTY_FUNCTION__;
=============================

bug.c: In function `foo':
bug.c:3: error: parse error at end of input
bug.c:3: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

Mainline and 4.0 barnch are not affected.
Comment 1 Andrew Pinski 2005-07-13 12:56:16 UTC
Confirmed, here is the backtrace:
#0  0x0806ac39 in finish_fname_decls () at ../../gcc/c-common.c:1047
#1  0x0804f7f6 in c_parse_file () at c-parse.y:3036
#2  0x0807f3b2 in c_common_parse_file (set_yydebug=0) at ../../gcc/c-opts.c:1237
#3  0x0827606d in toplev_main (argc=0, argv=0xbfffec7a) at ../../gcc/toplev.c:1822
Comment 2 rsandifo@gcc.gnu.org 2005-07-29 07:25:10 UTC
Testing a patch.
Comment 3 CVS Commits 2005-08-08 07:38:38 UTC
Subject: Bug 22458

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rsandifo@gcc.gnu.org	2005-08-08 07:38:30

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr22458-1.c 

Log message:
	PR c/22458
	* gcc.dg/pr22458-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5890&r2=1.5891
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr22458-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 4 CVS Commits 2005-08-08 07:40:13 UTC
Subject: Bug 22458

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	rsandifo@gcc.gnu.org	2005-08-08 07:40:09

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr22458-1.c 

Log message:
	PR c/22458
	* gcc.dg/pr22458-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.320&r2=1.5084.2.321
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr22458-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1

Comment 6 rsandifo@gcc.gnu.org 2005-08-08 07:51:10 UTC
Patch applied to 3.4.  Testcase also applied to mainline and 4.0.