]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/28114 (ICE with struct definition in argument of template function)
authorSteve Ellcey <sje@cup.hp.com>
Wed, 12 Jul 2006 21:46:43 +0000 (21:46 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Wed, 12 Jul 2006 21:46:43 +0000 (21:46 +0000)
PR c++/28114
* name-lookup.c (pushtag): Return if we have error_mark_node.

From-SVN: r115397

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

index b841f4ab118dcbf6675ef876289f2c217b3e2ef2..5dd905fbdf9ba5bd8df11e54428d526ae4d47bbe 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-12  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28114
+       * name-lookup.c (pushtag): Return if we have error_mark_node.
+
 2006-07-11  Lee Millward  <lee.millward@gmail.com>
 
        PR c++/28051
index fb527e2b0fc4f6ee5754c6e1316b24a0b279f183..2f1d39ec5c09f049adc4acf1bcf4632ec126486e 100644 (file)
@@ -4672,7 +4672,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);
+           {
+             decl = pushdecl_with_scope (decl, b);
+             if (decl == error_mark_node)
+               POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl);
+           }
 
          /* FIXME what if it gets a name from typedef?  */
          if (ANON_AGGRNAME_P (name))