https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Dec 20 17:33:13 2019 New Revision: 279664 URL: https://gcc.gnu.org/viewcvs?rev=279664&root=gcc&view=rev Log: Backported from mainline 2019-12-03 Jakub Jelinek <ja...@redhat.com> 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. Added: branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C Modified: branches/gcc-9-branch/gcc/cp/ChangeLog branches/gcc-9-branch/gcc/cp/constexpr.c branches/gcc-9-branch/gcc/testsuite/ChangeLog