[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 3 08:19:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Dec  3 08:19:04 2019
New Revision: 278921

URL: https://gcc.gnu.org/viewcvs?rev=278921&root=gcc&view=rev
Log:
        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:
    trunk/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list