PR debug/89006
* config/i386/i386.c (ix86_pic_register_p): Return true for
UNSPEC_SET_GOT too.
* g++.dg/debug/pr89006.C: New test.
From-SVN: r268248
2019-01-24 Jakub Jelinek <jakub@redhat.com>
+ PR debug/89006
+ * config/i386/i386.c (ix86_pic_register_p): Return true for
+ UNSPEC_SET_GOT too.
+
PR tree-optimization/88964
* gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also
punt if HONOR_SNANS (chrec).
if (GET_CODE (x) == VALUE && CSELIB_VAL_PTR (x))
return (pic_offset_table_rtx
&& rtx_equal_for_cselib_p (x, pic_offset_table_rtx));
+ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SET_GOT)
+ return true;
else if (!REG_P (x))
return false;
else if (pic_offset_table_rtx)
2019-01-24 Jakub Jelinek <jakub@redhat.com>
+ PR debug/89006
+ * g++.dg/debug/pr89006.C: New test.
+
PR middle-end/89015
* gcc.dg/gomp/pr89015.c: New test.
--- /dev/null
+// PR debug/89006
+// { dg-do compile }
+// { dg-options "-O2 -g -w" }
+// { dg-additional-options "-fPIC" { target fpic } }
+// { dg-bogus "non-delegitimized UNSPEC UNSPEC_SET_GOT" "" { target { i?86-*-* x86_64-*-* } } 0 }
+
+struct A { A (bool); };
+
+static void
+foo (const char *x)
+{
+ new A (x);
+}
+
+void
+bar ()
+{
+ foo ("foo");
+ foo ("bar");
+}