In r265371 (S/390: Make "b" constraint match literal pool references)
the CONSTANT_POOL_ADDRESS_P () check was moved from
s390_loadrelative_operand_p () to s390_check_qrst_address (). However,
in the original code it was guarded by SYMBOL_REF_P (), which was not
added to the new code.
gcc/ChangeLog:
2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_check_qrst_address): Add the missing
SYMBOL_REF_P () check.
gcc/testsuite/ChangeLog:
2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
* gcc.target/s390/
20181024-1.c: New test.
From-SVN: r265458
+2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * config/s390/s390.c (s390_check_qrst_address): Add the missing
+ SYMBOL_REF_P () check.
+
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/87105
/* This check makes sure that no symbolic address (except literal
pool references) are accepted by the R or T constraints. */
if (s390_loadrelative_operand_p (op, &symref, NULL)
- && (!lit_pool_ok || !CONSTANT_POOL_ADDRESS_P (symref)))
+ && (!lit_pool_ok
+ || !SYMBOL_REF_P (symref)
+ || !CONSTANT_POOL_ADDRESS_P (symref)))
return 0;
/* Ensure literal pool references are only accepted if LIT_POOL_OK. */
+2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/20181024-1.c: New test.
+
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/87105
--- /dev/null
+/* Make sure s390_check_qrst_address () correctly handles UNSPEC rtxs. */
+/* { dg-compile } */
+/* { dg-options "-march=z196 -O2 -fPIC" } */
+
+int a, b, g, h;
+struct
+{
+ int i;
+ struct
+ {
+ int d;
+ } k[];
+} f;
+
+void m(int);
+
+void l()
+{
+ int j;
+ for (; h;)
+ {
+ m((
+ {
+ __asm__("" : "=r"(g));
+ b;
+ }
+ ));
+ f.k[j].d = a;
+ j++;
+ }
+ f.i = j;
+}