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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:9efe4e153d994974afcbba09c3c683f5f4a19c63

commit r13-1901-g9efe4e153d994974afcbba09c3c683f5f4a19c63
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.

Reply via email to