The following invalid code snippet triggers an ICE since GCC 4.1.0 (only with the C frontend): ======================================== void foo() x; const char* p = __FUNCTION__; ======================================== bug.c: In function 'foo': bug.c:1: error: expected declaration specifiers before 'x' bug.c:3: error: parameter 'p' is initialized bug.c:0: internal compiler error: Segmentation fault Please submit a full bug report, [etc.]
Testing patch. Honza
Subject: Bug number PR c/28419 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/2006-07/msg00910.html
The patch is OK.
Subject: Bug 28419 Author: hubicka Date: Fri Oct 13 07:41:53 2006 New Revision: 117684 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117684 Log: PR c/28419 * c-decl.c (c_make_fname_decl): Do not segfault in case where current_function_decl is set but current_function_scope is not. * gcc.dg/pr28319.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr28419.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-decl.c trunk/gcc/testsuite/ChangeLog
Fixed in mainline.
Closing 4.1 branch.