Commit b676a079 by Jason Merrill Committed by Jason Merrill

Fix abi-tag17.C.

	* pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
	between template and instantiation.

From-SVN: r233017
parent 0c221916
2016-01-31 Jason Merrill <jason@redhat.com>
* pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
between template and instantiation.
2016-01-29 Jakub Jelinek <jakub@redhat.com> 2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR debug/66869 PR debug/66869
......
...@@ -8482,11 +8482,7 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context, ...@@ -8482,11 +8482,7 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
tree attributes tree attributes
= lookup_attribute (tags[ix], TYPE_ATTRIBUTES (template_type)); = lookup_attribute (tags[ix], TYPE_ATTRIBUTES (template_type));
if (!attributes) if (attributes)
;
else if (!TREE_CHAIN (attributes) && !TYPE_ATTRIBUTES (t))
TYPE_ATTRIBUTES (t) = attributes;
else
TYPE_ATTRIBUTES (t) TYPE_ATTRIBUTES (t)
= tree_cons (TREE_PURPOSE (attributes), = tree_cons (TREE_PURPOSE (attributes),
TREE_VALUE (attributes), TREE_VALUE (attributes),
......
// { dg-final { scan-assembler "_Z3fi1B6_X_tagv" } }
struct __attribute((abi_tag("_A1_tag"))) A1 {};
template <class T> struct __attribute((abi_tag("_X_tag"))) X {};
X<int> fi1();
int main() {
X<A1> xa;
fi1();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment