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

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 20 17:33:00 GMT 2019


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  <jakub@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


More information about the Gcc-bugs mailing list