Commit 7291b2ed by Marek Polacek

c-family: Fix ICE on attribute with -fgnu-tm [PR94733]

find_tm_attribute was using TREE_PURPOSE to get the attribute name,
which is breaking now that we preserve the C++11-style attribute
format past decl_attributes.  So use get_attribute_name which can
handle both formats of attributes.

	PR c++/94733
	* c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
	TREE_PURPOSE.

	* g++.dg/tm/attrib-5.C: New test.
parent bca558de
2020-04-23 Marek Polacek <polacek@redhat.com>
PR c++/94733
* c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
TREE_PURPOSE.
2020-04-14 Patrick Palka <ppalka@redhat.com>
PR c++/85278
......
......@@ -3314,7 +3314,7 @@ find_tm_attribute (tree list)
{
for (; list ; list = TREE_CHAIN (list))
{
tree name = TREE_PURPOSE (list);
tree name = get_attribute_name (list);
if (tm_attr_to_mask (name) != 0)
return name;
}
......
2020-04-23 Marek Polacek <polacek@redhat.com>
PR c++/94733
* g++.dg/tm/attrib-5.C: New test.
2020-04-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/94724
......
// PR c++/94733
// { dg-do compile { target c++11 } }
// { dg-options "-fgnu-tm" }
struct [[gnu::may_alias]] pe { };
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