aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2017-02-22 19:31:49 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2017-02-22 19:31:49 +0000
commitaba254d025f229a70fd96429adc6c88cf0a4a005 (patch)
treec8ac56e87a30aaa556489b6ede9d585044030122 /gcc/cp/pt.c
parent70d4d06ab769be93edec3f15117b434829591b64 (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245657 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 38a01e168a7..5b0f62d3832 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10012,6 +10012,8 @@ tsubst_attribute (tree t, tree *decl_p, tree args,
/* An attribute pack expansion. */
tree purp = TREE_PURPOSE (t);
tree pack = tsubst_pack_expansion (val, args, complain, in_decl);
+ if (pack == error_mark_node)
+ return error_mark_node;
int len = TREE_VEC_LENGTH (pack);
tree list = NULL_TREE;
tree *q = &list;