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.
Loading
Please register or sign in to comment