PR debug/89704
* dwarf2out.c (add_const_value_attribute): Return false for MINUS,
SIGN_EXTEND and ZERO_EXTEND.
* gcc.dg/debug/pr89704.c: New test.
From-SVN: r269700
+2019-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/89704
+ * dwarf2out.c (add_const_value_attribute): Return false for MINUS,
+ SIGN_EXTEND and ZERO_EXTEND.
+
2019-03-14 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
case HIGH:
case CONST_FIXED:
+ case MINUS:
+ case SIGN_EXTEND:
+ case ZERO_EXTEND:
return false;
case MEM:
+2019-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/89704
+ * gcc.dg/debug/pr89704.c: New test.
+
2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/89650
--- /dev/null
+/* PR debug/89704 */
+/* { dg-do compile } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+
+int
+foo (void)
+{
+ lab1:;
+ lab2:;
+ static int i = (intptr_t) &&lab1 - (intptr_t) &&lab2;
+ static int j = (intptr_t) &&lab1 - (intptr_t) &&lab2;
+ return i;
+}