parse.y (template_datadef): Check for error_mark_node.

cp:
	* parse.y (template_datadef): Check for error_mark_node.
testsuite:
	* g++.old-deja/g++.pt/crash62.C: New test.

From-SVN: r38714
This commit is contained in:
Nathan Sidwell 2001-01-05 16:35:36 +00:00 committed by Nathan Sidwell
parent 15fe1a7ed1
commit 220bce48e5
4 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (template_datadef): Check for error_mark_node.
2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.def (DEFAULT_ARG): Make `x' class.

View File

@ -696,8 +696,13 @@ template_datadef:
| typed_declspecs initdecls ';'
{ note_list_got_semicolon ($1.t); }
| structsp ';'
{ maybe_process_partial_specialization ($1.t);
note_got_semicolon ($1.t); }
{
if ($1.t != error_mark_node)
{
maybe_process_partial_specialization ($1.t);
note_got_semicolon ($1.t);
}
}
;
datadef:

View File

@ -1,3 +1,7 @@
2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/crash62.C: New test.
2001-01-04 Richard Henderson <rth@redhat.com>
* gcc.dg/20000926-1.c: Update expected warnings.

View File

@ -0,0 +1,8 @@
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 5 Jan 2001 <nathan@codesourcery.com>
// Bug 911, ICE on bogus template declaration
template <class T> class A<T>; // ERROR - not a template