From: Jakub Jelinek Date: Mon, 4 Jul 2016 17:31:38 +0000 (+0200) Subject: re PR c++/71739 (ICE on valid C++11 code: tree check: expected identifier_node, have... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a5537c3e20ffae1e35923a063d42a3f21e47727;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa81753ce95..35d27e5c39d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-07-04 Jakub Jelinek + + PR c++/71739 + * tree.c (attribute_value_equal): Use get_attribute_name instead of + directly using TREE_PURPOSE. + 2016-07-04 Jiong Wang * config/aarch64/aarch64.h: Rename "ARMv8.1" to "ARMv8.1-A". diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9066d0f3afe..9e819ac4ed2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-07-04 Jakub Jelinek + + PR c++/71739 + * g++.dg/cpp0x/pr71739.C: New test. + 2016-07-04 Christophe Lyon * c-c++-common/asan/clone-test-1.c (main): Handle clone() failure. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr71739.C b/gcc/testsuite/g++.dg/cpp0x/pr71739.C new file mode 100644 index 00000000000..b31a580cd0e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr71739.C @@ -0,0 +1,5 @@ +// PR c++/71739 +// { dg-do compile { target c++11 } } + +template struct alignas(N) A; +template struct alignas(N) A {}; diff --git a/gcc/tree.c b/gcc/tree.c index bc60190b339..22951118e4c 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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);