diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-01-05 16:35:36 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-01-05 16:35:36 +0000 |
commit | 220bce48e55cf7c052b513e39b4da0df8346ed18 (patch) | |
tree | 137bcc992efe8d16947d8a2c6818428104f3b918 | |
parent | 15fe1a7ed1395cda8768662f5aaa4b7eee21ef78 (diff) | |
download | gcc-220bce48e55cf7c052b513e39b4da0df8346ed18.zip gcc-220bce48e55cf7c052b513e39b4da0df8346ed18.tar.gz gcc-220bce48e55cf7c052b513e39b4da0df8346ed18.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/parse.y | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash62.C | 8 |
4 files changed, 23 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c9ee127..d7a7a3b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 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. 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk> diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 0970057..c92b791 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -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: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 59891ec..61a5d2b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash62.C b/gcc/testsuite/g++.old-deja/g++.pt/crash62.C new file mode 100644 index 0000000..faf97af --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash62.C @@ -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 |