This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug report: internal compiler error
- To: C dot vanReeuwijk at twi dot tudelft dot nl
- Subject: Re: Bug report: internal compiler error
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sat, 11 Jul 1998 16:26:25 +0200
- CC: egcs-bugs at cygnus dot com, frits at pgsultra dot twi dot tudelft dot nl, leo at lspace dot org
- References: <19980710143118.B14340@pds.twi.tudelft.nl>
> 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 <loewis@informatik.hu-berlin.de>
* 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. */