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

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

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

commit r14-8436-gf03b8f595b6350732bb0a9a69557c5ed2af085b2
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Thu Jan 25 08:30:36 2024 -0800

    aarch64: Fix undefinedness while testing the J constraint [PR100204]

    The J constraint can invoke undefined behavior due to it taking the
    negative of the ival if ival was HWI_MIN. The fix is simple as casting
    to `unsigned HOST_WIDE_INT` before doing the negative of it. This
    does that.

    Committed as obvious after build/test for aarch64-linux-gnu.

    gcc/ChangeLog:

            PR target/100204
            * config/aarch64/constraints.md (J): Cast to `unsigned
HOST_WIDE_INT`
            before taking the negative of it.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to