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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Jakub Jelinek
<[email protected]>:

https://gcc.gnu.org/g:a0969384a83a5d65701934c1bb6e113a4d7e14b4

commit r16-9551-ga0969384a83a5d65701934c1bb6e113a4d7e14b4
Author: Jakub Jelinek <[email protected]>
Date:   Tue Aug 18 17:51:14 2026 +0200

    c++: Fix up assert in build_vec_init [PR126752]

    The following testcase ICEs in an assert added by Marek in
    r15-6308.  A subsequent change r15-6897 made the code added in
    the former commit no longer trigger on anything in the testsuite,
    including the initlist-array{23,24}.C tests added for it.
    Later on I've added an optimization in r16-343 so that cleanups
    clear rval instead of setting iterator to maxindex but missed
    this spot and nothing in the testsuite triggered it.

    The following patch adjusts the assert to what the r16-343 change
    does.

    2026-08-18  Jakub Jelinek  <[email protected]>

            PR c++/126752
            * init.cc (build_vec_init): Assert TREE_PURPOSE of the
            last *cleanup_flags element is rval rather than iterator.

            * g++.dg/cpp0x/initlist-array25.C: New test.

    Reviewed-by: Jason Merrill <[email protected]>
    (cherry picked from commit e78da8455a1ef5b188085d97a61b4e7dee812c93)

Reply via email to