PR debug/80436
* tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
* g++.dg/opt/pr80436.C: New test.
From-SVN: r247000
+2017-04-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/80436
+ * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
+
2017-04-19 Georg-Johann Lay <avr@gjlay.de>
PR target/80462
+2017-04-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/80436
+ * g++.dg/opt/pr80436.C: New test.
+
2017-04-19 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/torture/pr80341.c: Require int32plus.
--- /dev/null
+// PR debug/80436
+// { dg-do compile { target c++11 } }
+// { dg-options "-O3 -fcompare-debug" }
+
+void fn (...);
+void foo (int, int, int);
+struct { int elt1; int bits; } *a;
+int b, d;
+
+int
+bar (unsigned *x)
+{
+ if (0)
+ next_bit:
+ return 1;
+ while (1)
+ {
+ if (b)
+ if (a->bits)
+ goto next_bit;
+ *x = b;
+ if (a->elt1)
+ return 0;
+ a = 0;
+ }
+}
+
+enum { C0, C1 } *c;
+
+void
+baz ()
+{
+ int e, m = d;
+ for (; e < m; e++)
+ {
+ if (e < 0)
+ foo (0, 0, c[e]);
+ unsigned f;
+ for (; bar (&f);)
+ fn (f);
+ }
+}
FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def)
{
+ if (is_gimple_debug (use_stmt))
+ continue;
+
basic_block use_bb = gimple_bb (use_stmt);
use_operand_p use_p;