re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)
authorJakub Jelinek <jakub@redhat.com>
Tue, 3 Dec 2019 08:19:04 +0000 (09:19 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 3 Dec 2019 08:19:04 +0000 (09:19 +0100)
commit5558a0da3248524d5fc081dc0580ab4f9e6eb0e2
treeea748b6074ebac645335ae075a76ac871e132270
parent3d109462bdd666cc5ce2d0b6b0c3b7a3c19b0b4c
re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)

PR c++/92695
* constexpr.c (cxx_bind_parameters_in_call): For virtual calls,
adjust the first argument to point to the derived object rather
than its base.

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

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