re PR c++/28114 (ICE with struct definition in argument of template function)
authorSteve Ellcey <sje@cup.hp.com>
Fri, 23 Jun 2006 21:58:25 +0000 (21:58 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Fri, 23 Jun 2006 21:58:25 +0000 (21:58 +0000)
PR c++/28114
* name-lookup.c (pushtag): Return if we have error_mark_node.

From-SVN: r114953

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index 178b0af9cea7876be5d9418b58a65b0a7280aceb..5a3ac21e0cde42afde3c8fde8deaaf82a6ce65ae 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-23  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28114
+       * name-lookup.c (pushtag): Return if we have error_mark_node.
+
 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
 
        PR c++/27019
index 3de99992a12b9640e6b67d4530e6843a9f3c79e5..0d195f9a3e8ced7e35fe4f27fe268bee3f285ef7 100644 (file)
@@ -4872,7 +4872,11 @@ pushtag (tree name, tree type, tag_scope scope)
            pushdecl_class_level (decl);
        }
       else if (b->kind != sk_template_parms)
-       decl = pushdecl_with_scope (decl, b, /*is_friend=*/false);
+       {
+         decl = pushdecl_with_scope (decl, b, /*is_friend=*/false);
+         if (decl == error_mark_node)
+           POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl);
+       }
 
       TYPE_CONTEXT (type) = DECL_CONTEXT (decl);