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 <[email protected]>:

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

commit r16-5136-gc180ad35fb695ee4797bf9c5cb8a292c7af6b358
Author: Andrew Pinski <[email protected]>
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 <[email protected]>

Reply via email to