From: Steve Ellcey Date: Wed, 12 Jul 2006 21:46:43 +0000 (+0000) Subject: re PR c++/28114 (ICE with struct definition in argument of template function) X-Git-Tag: releases/gcc-4.0.4~538 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcc413d66cc53594370662616d2d37803e296d15;p=thirdparty%2Fgcc.git re PR c++/28114 (ICE with struct definition in argument of template function) PR c++/28114 * name-lookup.c (pushtag): Return if we have error_mark_node. From-SVN: r115397 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b841f4ab118d..5dd905fbdf9b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2006-07-12 Steve Ellcey + + PR c++/28114 + * name-lookup.c (pushtag): Return if we have error_mark_node. + 2006-07-11 Lee Millward PR c++/28051 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index fb527e2b0fc4..2f1d39ec5c09 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -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))