re PR c++/71739 (ICE on valid C++11 code: tree check: expected identifier_node, have tree_list in private_is_attribute_p, at tree.c:6080)

PR c++/71739
	* tree.c (attribute_value_equal): Use get_attribute_name instead of
	directly using TREE_PURPOSE.

	* g++.dg/cpp0x/pr71739.C: New test.

From-SVN: r237991
This commit is contained in:
Jakub Jelinek 2016-07-04 19:31:38 +02:00 committed by Jakub Jelinek
parent 74bb9de4ea
commit 2a5537c3e2
4 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2016-07-04 Jakub Jelinek <jakub@redhat.com>
PR c++/71739
* tree.c (attribute_value_equal): Use get_attribute_name instead of
directly using TREE_PURPOSE.
2016-07-04 Jiong Wang <jiong.wang@arm.com>
* config/aarch64/aarch64.h: Rename "ARMv8.1" to "ARMv8.1-A".

View File

@ -1,3 +1,8 @@
2016-07-04 Jakub Jelinek <jakub@redhat.com>
PR c++/71739
* g++.dg/cpp0x/pr71739.C: New test.
2016-07-04 Christophe Lyon <christophe.lyon@linaro.org>
* c-c++-common/asan/clone-test-1.c (main): Handle clone() failure.

View File

@ -0,0 +1,5 @@
// PR c++/71739
// { dg-do compile { target c++11 } }
template <int N> struct alignas(N) A;
template <int N> struct alignas(N) A {};

View File

@ -5009,7 +5009,7 @@ attribute_value_equal (const_tree attr1, const_tree attr2)
&& TREE_CODE (TREE_VALUE (attr2)) == TREE_LIST)
{
/* Handle attribute format. */
if (is_attribute_p ("format", TREE_PURPOSE (attr1)))
if (is_attribute_p ("format", get_attribute_name (attr1)))
{
attr1 = TREE_VALUE (attr1);
attr2 = TREE_VALUE (attr2);