The following invalid code snippet triggers an ICE since GCC 3.4.0: =============================== template<int> struct A { int i; A() { using i; } }; A<0> b; =============================== bug.cc: In constructor 'A<<anonymous> >::A()': bug.cc:4: error: expected nested-name-specifier before 'i' bug.cc:4: error: 'i' not declared bug.cc: In constructor 'A<<anonymous> >::A() [with int <anonymous> = 0]': bug.cc:7: instantiated from here bug.cc:4: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] Will post a patch soon.
Subject: Bug number PR c++/27933 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-06/msg00368.html
Subject: Bug 27933 Author: reichelt Date: Mon Jun 12 21:12:52 2006 New Revision: 114580 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114580 Log: PR c++/27933 * name-lookup.c (lookup_qualified_name): Always return error_mark_node if lookup fails. * g++.dg/lookup/using15.C: New test. Added: trunk/gcc/testsuite/g++.dg/lookup/using15.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/name-lookup.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 27933 Author: reichelt Date: Mon Jun 12 21:18:20 2006 New Revision: 114581 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114581 Log: PR c++/27933 * name-lookup.c (lookup_qualified_name): Always return error_mark_node if lookup fails. * g++.dg/lookup/using15.C: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/lookup/using15.C Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/name-lookup.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
Subject: Bug 27933 Author: reichelt Date: Mon Jun 12 21:23:30 2006 New Revision: 114582 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114582 Log: PR c++/27933 * name-lookup.c (lookup_qualified_name): Always return error_mark_node if lookup fails. * g++.dg/lookup/using15.C: New test. Added: branches/gcc-4_0-branch/gcc/testsuite/g++.dg/lookup/using15.C Modified: branches/gcc-4_0-branch/gcc/cp/ChangeLog branches/gcc-4_0-branch/gcc/cp/name-lookup.c branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
Fixed on mainline, 4.1 branch, and 4.0 branch.