The testcase g++.dg/template/inherit.C causes an ICE on the 4.1 branch and mainline: ===================================================== template<typename T> struct X { void f() { } }; struct Z : X<int> { }; int main() { Z z; z.X::f(); // { dg-error ".*" "" } } ===================================================== inherit.C: In function 'int main()': inherit.C:9: error: 'template<class T> struct X' used without template parameters inherit.C:9: internal compiler error: in finish_class_member_access_expr, at cp/typeck.c:1996 Please submit a full bug report, [etc.] Because of the catch-all marker { dg-error ".*" "" } the testcase still PASSes despite the ICE. That means, that the testcase should also be fixed Btw, this is the only ICE I found in the logfiles for 4.1 and 4.2 (and also 4.0) that wasn't flagged.
Confirmed.
Mark, the ICE appeared with your patch for PR20293: http://gcc.gnu.org/ml/gcc-cvs/2005-11/msg00580.html
Subject: Bug 25300 Author: mmitchel Date: Mon Dec 12 16:29:44 2005 New Revision: 108413 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108413 Log: PR c++/25300 * tree.c (build_qualified_name): Return error_mark_node for erroneous input. PR c++/25300 * g++.dg/template/inherit.C: Do not use a generic error message. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/tree.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/template/inherit.C
Subject: Bug 25300 Author: mmitchel Date: Mon Dec 12 16:30:24 2005 New Revision: 108414 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108414 Log: PR c++/25300 * tree.c (build_qualified_name): Return error_mark_node for erroneous input. PR c++/25300 * g++.dg/template/inherit.C: Do not use a generic error message. Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/tree.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/inherit.C
Fixed in 4.1.