[Bug middle-end/122605] [16 Regression] gcc.target/i386/pr105951-[12].c ICEs

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 10 18:25:55 GMT 2025


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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

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

commit r16-5136-gc180ad35fb695ee4797bf9c5cb8a292c7af6b358
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date:   Fri Nov 7 21:08:42 2025 -0800

    builtins: Fix atomics expansion after build_call_nary change [PR122605]

    So before r16-5089-gc66ebc3e22138, we could call build_call_nary with more
    arguments than was passed as the nargs. Afterwards we get an assert if
there
    were not exactly that amount.
    In this case the code is easier to read when passing the correct number of
args
    in the first place.
    This fixes the two places in builtins.cc where this pattern shows up.

    Bootstrapped and tested on x86_64-linux-gnu (and tested the testcase with
-m32 where
    the failure showed up).

            PR middle-end/122605
    gcc/ChangeLog:

            * builtins.cc (expand_ifn_atomic_bit_test_and): Split out the call
to
            build_call_nary into two different statements.
            (expand_ifn_atomic_op_fetch_cmp_0): Likewise.

    Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>


More information about the Gcc-bugs mailing list