[Bug target/99540] [10 Regression] ICE: Segmentation fault in aarch64_add_offset

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 24 19:19:02 GMT 2021


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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:7e1c6d7a53a64fdca23b2299b43f57f7a1dece74

commit r10-9528-g7e1c6d7a53a64fdca23b2299b43f57f7a1dece74
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Mar 24 19:18:02 2021 +0000

    aarch64: Make aarch64_add_offset work with -ftrapv [PR99540]

    aarch64_add_offset uses expand_mult to multiply the SVE VL by an
    out-of-range constant.  expand_mult takes an argument to indicate
    whether the multiplication is signed or unsigned, but in this
    context the multiplication is effectively signless and so the
    choice seemed arbitrary.

    However, one of the things that the signedness input does is
    indicate whether signed overflow should be trapped for -ftrapv.
    We don't want that here, so we must treat the multiplication
    as unsigned.

    gcc/
    2021-03-24  Jakub Jelinek  <jakub@redhat.com>

            PR target/99540
            * config/aarch64/aarch64.c (aarch64_add_offset): Tell
            expand_mult to perform an unsigned rather than a signed
            multiplication.

    gcc/testsuite/
    2021-03-24  Richard Sandiford  <richard.sandiford@arm.com>

            PR target/99540
            * gcc.dg/vect/pr99540.c: New test.


More information about the Gcc-bugs mailing list