The following invalid code snippet triggers an ICE on mainline: ============================================================ template<int> struct A; struct __attribute__((unused)) A<0<; ============================================================ bug.cc:3: error: template argument 1 is invalid bug.cc:3: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in cp_parser_elaborated_type_specifier, at cp/parser.c:10245 Please submit a full bug report, [etc.]
Subject: Bug number PR c++/28269 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/msg00383.html
Subject: Bug 28269 Author: lmillward Date: Sat Jul 15 15:00:28 2006 New Revision: 115475 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115475 Log: PR c++/28269 * parser.c (cp_parser_elaborated_type_specifier): Return early if an invalid type was detected. * g++.dg/template/crash54.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/crash54.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog
Fixed.