diff options
author | Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> | 2003-08-07 14:36:39 +0000 |
---|---|---|
committer | Kriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org> | 2003-08-07 14:36:39 +0000 |
commit | 3adee96c46c8f70fb52de86775c1524654f10f22 (patch) | |
tree | e9523e839afdddc29c20fdefebc1393dcbf111b9 /gcc/cp/parser.c | |
parent | 7d1496792bf96d5364e31b90656539ce3539c608 (diff) | |
download | gcc-3adee96c46c8f70fb52de86775c1524654f10f22.zip gcc-3adee96c46c8f70fb52de86775c1524654f10f22.tar.gz gcc-3adee96c46c8f70fb52de86775c1524654f10f22.tar.bz2 |
re PR c++/5767 (ICE with forwarding template template parameters)
PR c++/5767
* parser.c (cp_parser_class_name): Return immediately when scope
is error_mark_node.
* g++.dg/parse/crash11.C: New test.
From-SVN: r70226
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index fce69ca..12f541a 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10957,6 +10957,9 @@ cp_parser_class_name (cp_parser *parser, /* PARSER->SCOPE can be cleared when parsing the template-arguments to a template-id, so we save it here. */ scope = parser->scope; + if (scope == error_mark_node) + return error_mark_node; + /* Any name names a type if we're following the `typename' keyword in a qualified name where the enclosing scope is type-dependent. */ typename_p = (typename_keyword_p && scope && TYPE_P (scope) |