re PR c++/79653 (ICE on invalid c++ code in cp_check_const_attributes in cp/decl2...
authorMarek Polacek <polacek@redhat.com>
Wed, 22 Feb 2017 19:31:49 +0000 (19:31 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 22 Feb 2017 19:31:49 +0000 (19:31 +0000)
commit78af14ae0e9fd1b698a1fde2ac43dcc31188e3b1
treec8ac56e87a30aaa556489b6ede9d585044030122
parent3b2a007843c9ccb740b05980358f13c75dc296b0
re PR c++/79653 (ICE on invalid c++ code in cp_check_const_attributes in cp/decl2.c:1423)

PR c++/79653
* parser.c (cp_parser_std_attribute_spec): Don't build the attribute
if the alignas expression is erroneous.
* pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
error_mark_node.

* g++.dg/cpp0x/alignas10.C: New test.
* g++.dg/cpp0x/alignas9.C: New test.

From-SVN: r245657
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/alignas10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/alignas9.C [new file with mode: 0644]