diff options
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 4ac9445..53e6bc9 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1218,10 +1218,12 @@ splice_template_attributes (tree *attr_p, tree decl) static void save_template_attributes (tree *attr_p, tree *decl_p) { - tree late_attrs = splice_template_attributes (attr_p, *decl_p); tree *q; - tree old_attrs = NULL_TREE; + if (attr_p && *attr_p == error_mark_node) + return; + + tree late_attrs = splice_template_attributes (attr_p, *decl_p); if (!late_attrs) return; @@ -1230,7 +1232,7 @@ save_template_attributes (tree *attr_p, tree *decl_p) else q = &TYPE_ATTRIBUTES (*decl_p); - old_attrs = *q; + tree old_attrs = *q; /* Merge the late attributes at the beginning with the attribute list. */ @@ -1318,6 +1320,9 @@ cp_reconstruct_complex_type (tree type, tree bottom) static void cp_check_const_attributes (tree attributes) { + if (attributes == error_mark_node) + return; + tree attr; for (attr = attributes; attr; attr = TREE_CHAIN (attr)) { |