22458 – [3.4 regression] ICE on missing brace (original) (raw)
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 Drea 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 Richard Sandiford 2005-07-29 07:25:10 UTC
Testing a patch.
Comment 6 Richard Sandiford 2005-08-08 07:51:10 UTC
Patch applied to 3.4. Testcase also applied to mainline and 4.0.