+2019-04-16 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/89528
+ * valtrack.c (dead_debug_insert_temp): Reset debug references
+ to the return value of a call being removed.
+
2019-04-16 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (arc_register_move_cost): Remove.
2019-04-16 Alexandre Oliva <aoliva@redhat.com>
+ PR debug/89528
+ * gcc.dg/guality/pr89528.c: New.
+
PR rtl-optimization/86438
* gcc.dg/torture/pr86438.c: Split up too-wide shift.
--- /dev/null
+/* PR debug/89528 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include <stdio.h>
+
+char b;
+int d, e;
+static int i = 1;
+void a(int l) { printf("", l); }
+char c(char l) { return l || b && l == 1 ? b : b % l; }
+short f(int l, int m) { return l * m; }
+short g(short l, short m) { return m || l == 767 && m == 1; }
+int h(int l, int m) { return (l ^ m & l ^ (m & 647) - m ^ m) < m; }
+static int j(int l) { return d == 0 || l == 647 && d == 1 ? l : l % d; }
+short k(int l) { return l >= 2 >> l; }
+void optimize_me_not() { asm(""); }
+static short n(void) {
+ int l_1127 = ~j(9 || 0) ^ 65535;
+ optimize_me_not(); /* { dg-final { gdb-test . "l_1127+1" "-65534" } } */
+ f(l_1127, i && e ^ 4) && g(0, 0);
+ e = 0;
+ return 5;
+}
+int main() { n(); }
{
dest = SET_DEST (set);
src = SET_SRC (set);
- /* Lose if the REG-setting insn is a CALL. */
- if (GET_CODE (src) == CALL)
- {
- while (uses)
- {
- cur = uses->next;
- XDELETE (uses);
- uses = cur;
- }
- return 0;
- }
- /* Asm in DEBUG_INSN is never useful, we can't emit debug info for
- that. And for volatile_insn_p, it is actually harmful
- - DEBUG_INSNs shouldn't have any side-effects. */
- else if (GET_CODE (src) == ASM_OPERANDS
- || volatile_insn_p (src))
+ /* Reset uses if the REG-setting insn is a CALL. Asm in
+ DEBUG_INSN is never useful, we can't emit debug info for
+ that. And for volatile_insn_p, it is actually harmful -
+ DEBUG_INSNs shouldn't have any side-effects. */
+ if (GET_CODE (src) == CALL || GET_CODE (src) == ASM_OPERANDS
+ || volatile_insn_p (src))
set = NULL_RTX;
}