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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:0b58219fe112c01ff335edf699c4fc69e718c75b

commit r15-7069-g0b58219fe112c01ff335edf699c4fc69e718c75b
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Mon Jan 20 18:00:43 2025 +0100

    c++: Handle RAW_DATA_CST in make_tree_vector_from_ctor [PR118528]

    This is the first bug discovered today with the
    https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673945.html
    hack but then turned into proper testcases where embed-21.C FAILed
    since introduction of optimized #embed support and the other when
    optimizing large C++ initializers using RAW_DATA_CST.

    The problem is that the C++ FE calls make_tree_vector_from_ctor
    and uses that as arguments vector for deduction guide handling.
    The call.cc code isn't prepared to handle RAW_DATA_CST just about
    everywhere, so I think it is safer to make sure RAW_DATA_CST only
    appears in CONSTRUCTOR_ELTS and nowhere else.
    Thus, the following patch expands the RAW_DATA_CSTs from initializers
    into multiple INTEGER_CSTs in the returned vector.

    2025-01-20  Jakub Jelinek  <ja...@redhat.com>

            PR c++/118528
            * c-common.cc (make_tree_vector_from_ctor): Expand RAW_DATA_CST
            elements from the CONSTRUCTOR to individual INTEGER_CSTs.

            * g++.dg/cpp/embed-21.C: New test.
            * g++.dg/cpp2a/class-deduction-aggr16.C: New test.

Reply via email to