The following invalid code snippet triggers an ICE on mainline (it was wrongly accepted before): ==================== namespace N { } struct N; struct N* p; ==================== bug.cc:2: error: 'struct N' redeclared as different kind of symbol bug.cc:1: error: previous declaration of 'namespace N { }' bug.cc:3: internal compiler error: Segmentation fault Please submit a full bug report, [etc.]
Confirmed.
I'm testing a patch for this one.
Subject: Bug number PR c++/33207 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-09/msg00667.html
Subject: Bug 33207 Author: simartin Date: Tue Sep 25 18:34:05 2007 New Revision: 128769 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128769 Log: gcc/cp/ 2007-09-25 Simon Martin <simartin@users.sourceforge.net> PR c++/33207 * name-lookup.c (pushtag): Do not create an implicit typedef before the associated type declaration is known to be valid. gcc/testsuite/ 2007-09-25 Simon Martin <simartin@users.sourceforge.net> PR c++/33207 * g++.dg/parse/crash38.C: New test. Added: trunk/gcc/testsuite/g++.dg/parse/crash38.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/name-lookup.c trunk/gcc/testsuite/ChangeLog
Fixed on the mainline.