re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)
authorJakub Jelinek <jakub@redhat.com>
Mon, 2 Dec 2019 21:33:06 +0000 (22:33 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 2 Dec 2019 21:33:06 +0000 (22:33 +0100)
commit3a0bd58fac55e8cdd4c2674bf10ca6998337236a
treef0c60e9477184eb1365fc89d2a98acf3dd055a29
parent871a8fab25b34ed43de1fd38ae0291e17ef53d1b
re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)

PR c++/92695
* constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Use
STRIP_NOPS before checking for ADDR_EXPR.

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

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