re PR c++/79372 (ICE on C++ code with illegal decomposition declaration on x86_64...
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Feb 2017 20:03:15 +0000 (21:03 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 6 Feb 2017 20:03:15 +0000 (21:03 +0100)
commita5e8cbd150d7e7200d54e2e1e125161139e2c7b8
tree77dc53b736e0bcccd7d0f3a5540ae17b6d0b4996
parent6f26f15f136506e40bb7a3a4f1cd5ca171322928
re PR c++/79372 (ICE on C++ code with illegal decomposition declaration on x86_64-linux-gnu: in tsubst_decomp_names, at cp/pt.c:15599)

PR c++/79372
* decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
* pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
with error_mark_node type.

* g++.dg/cpp1z/decomp25.C: New test.

From-SVN: r245218
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/decomp25.C [new file with mode: 0644]