[Bug target/96308] ICE in s390_cannot_force_const_mem, at config/s390/s390.c:4153

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 12 06:22:26 GMT 2020


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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andreas Krebbel <krebbel@gcc.gnu.org>:

https://gcc.gnu.org/g:220ffae474db36ba20487427be699f0987a00b0c

commit r11-2662-g220ffae474db36ba20487427be699f0987a00b0c
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date:   Wed Aug 12 08:02:35 2020 +0200

    IBM Z: Fix PR96308

    For the testcase a symbol with a TLS reloc and an unary minus is being
    generated.  The backend didn't handle this correctly.

    In s390_cannot_force_const_mem an unary minus on a symbolic constant
    is rejected now since gas would not allow this.

    legitimize_tls_address now makes the NEG rtx the outermost operation
    by pulling it out of the CONST rtx.

    gcc/ChangeLog:

            PR target/96308
            * config/s390/s390.c (s390_cannot_force_const_mem): Reject an
            unary minus for everything not being a numeric constant.
            (legitimize_tls_address): Move a NEG out of the CONST rtx.

    gcc/testsuite/ChangeLog:

            PR target/96308
            * g++.dg/pr96308.C: New test.


More information about the Gcc-bugs mailing list