* tree-outof-ssa.c (trivially_conflicts_p): Don't consider debug
stmt uses.
* gcc.dg/pr42719.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156038
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-01-19 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/42719
+ * tree-outof-ssa.c (trivially_conflicts_p): Don't consider debug
+ stmt uses.
+
PR debug/42728
* fwprop.c (all_uses_available_at): Return false if def_set dest
is a REG that is used in def_insn.
2010-01-19 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/42719
+ * gcc.dg/pr42719.c: New test.
+
PR debug/42728
* gcc.dg/pr42728.c: New test.
--- /dev/null
+/* PR tree-optimization/42719 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftracer -fcompare-debug" } */
+
+int *v;
+
+void
+foo (int a)
+{
+ int i, j;
+ for (j = i = a; i != -1; j = i, i = v[i])
+ ;
+ v[j] = v[a];
+}
FOR_EACH_IMM_USE_FAST (use, imm_iter, result)
{
gimple use_stmt = USE_STMT (use);
+ if (is_gimple_debug (use_stmt))
+ continue;
/* Now, if there's a use of RESULT that lies outside this basic block,
then there surely is a conflict with ARG. */
if (gimple_bb (use_stmt) != bb)