Backported from mainline
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.
* gcc.dg/debug/pr89704.c: New test.
From-SVN: r275133
2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 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 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89679
case HIGH:
case CONST_FIXED:
+ case MINUS:
+ case SIGN_EXTEND:
+ case ZERO_EXTEND:
return false;
case MEM:
2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/89704
+ * gcc.dg/debug/pr89704.c: New test.
+
2019-03-14 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89679
--- /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;
+}