From c5f8391c77ffbce87b0a3e0ad436ab36a5913dd9 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Fri, 23 Jun 2006 21:58:25 +0000 Subject: [PATCH] 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: r114953 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/name-lookup.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 178b0af9cea..5a3ac21e0cd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2006-06-23 Steve Ellcey + + PR c++/28114 + * name-lookup.c (pushtag): Return if we have error_mark_node. + 2006-06-23 Steve Ellcey PR c++/27019 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 3de99992a12..0d195f9a3e8 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -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); -- 2.30.2