aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d67d785..32ddf83 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1499,9 +1499,9 @@ apply_identity_attributes (tree result, tree attribs, bool *remove_attributes)
p = &TREE_CHAIN (*p);
}
}
- else if (first_ident)
+ else if (first_ident && first_ident != error_mark_node)
{
- for (tree a2 = first_ident; a2; a2 = TREE_CHAIN (a2))
+ for (tree a2 = first_ident; a2 != a; a2 = TREE_CHAIN (a2))
{
*p = tree_cons (TREE_PURPOSE (a2), TREE_VALUE (a2), NULL_TREE);
p = &TREE_CHAIN (*p);