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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:6b7d570a5001bb79e34c0d1626a8c7f55386dac7

commit r12-8684-g6b7d570a5001bb79e34c0d1626a8c7f55386dac7
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Jul 26 11:02:21 2022 -0400

    c++: constexpr, empty base after non-empty [PR106369]

    Here the CONSTRUCTOR we were providing for D{} had an entry for the B base
    subobject at offset 0 following the entry for the C base, causing
    output_constructor_regular_field to ICE due to going backwards.  It might
be
    nice for that function to be more tolerant of empty fields, but it also
    seems reasonable for the front end to prune the useless entry.

            PR c++/106369

    gcc/cp/ChangeLog:

            * constexpr.cc (reduced_constant_expression_p): Return false
            if a CONSTRUCTOR initializes an empty field.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1z/constexpr-lambda27.C: New test.

    (cherry picked from commit 9efe4e153d994974afcbba09c3c683f5f4a19c63)

Reply via email to