From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin von Loewis To: C.vanReeuwijk@twi.tudelft.nl Cc: egcs-bugs@cygnus.com, frits@pgsultra.twi.tudelft.nl, leo@lspace.org Subject: Re: Bug report: internal compiler error Date: Sat, 11 Jul 1998 07:27:00 -0000 Message-id: <199807111426.QAA00153@mira.isdn.cs.tu-berlin.de> References: <19980710143118.B14340@pds.twi.tudelft.nl> X-SW-Source: 1998-07/msg00296.html List-Id: > I have reported the same ICE before (early april), but I've managed > to reduce the example (in fact, I've *halved* the line count :-)). Thanks for your test case, I'll add it as g++.pt/explicit69.C. A patch for the bug is below. Martin 1998-07-11 Martin von Löwis * semantics.c (finish_class_definition): Gracefully handle classes that look like template instantiations. Index: semantics.c =================================================================== RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/semantics.c,v retrieving revision 1.14 diff -c -p -r1.14 semantics.c *** semantics.c 1998/07/07 11:25:01 1.14 --- semantics.c 1998/07/11 08:25:40 *************** finish_class_definition (t, components, *** 1293,1298 **** --- 1298,1309 ---- etc. */ shadow_tag (CLASSTYPE_AS_LIST (t)); */ #endif + + if (processing_explicit_instantiation) + { + /* We got 'template class x {};'. We will complain later. */ + return t; + } /* finish_struct nukes this anyway; if finish_exception does too, then it can go. */