re PR c++/92414 (internal compiler error: tree check: expected constructor, have...
authorJakub Jelinek <jakub@redhat.com>
Tue, 19 Nov 2019 21:28:22 +0000 (22:28 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 19 Nov 2019 21:28:22 +0000 (22:28 +0100)
commitfce6467b1ef93c162f955a10d9bdb2bfb2e12c1c
treeb8a1da4576a3bcf5ef2182777180953d6af6f675
parent8d5d90878ea9731301d3a1af32a444e4772e65e4
re PR c++/92414 (internal compiler error: tree check: expected constructor, have error_mark in cxx_eval_store_expression, at cp/constexpr.c:4009)

PR c++/92414
* constexpr.c (cxx_eval_outermost_constant_expr): If DECL_INITIAL
on object is erroneous, return t without trying to evaluate
a constexpr dtor.

* g++.dg/cpp2a/constexpr-dtor4.C: New test.

From-SVN: r278468
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C [new file with mode: 0644]