Hi!
This patch fixes
-FAIL: gcc.dg/guality/pr54693-2.c -O1 line 21 i == v + 1
-FAIL: gcc.dg/guality/pr54693-2.c -O2 line 21 i == v + 1
-FAIL: gcc.dg/guality/pr54693-2.c -O3 -fomit-frame-pointer line 21 i == v + 1
-FAIL: gcc.dg/guality/pr54693-2.c -O3 -g line 21 i == v + 1
-FAIL: gcc.dg/guality/pr54693.c -O1 line 22 i == c - 48
on both x86_64-linux and i686-linux (and the x/y/z tests in the new testcase
from UNSUPPORTED to PASS) by copying the debug stmt in ch pass similarly to
how jump threading does that.
Ok for trunk?
2012-11-06 Jakub Jelinek <jakub@redhat.com>
PR debug/54693
* tree-flow.h (propagate_threaded_block_debug_into): New prototype.
* tree-ssa-threadedge.c (propagate_threaded_block_debug_into): No
longer static.
* tree-ssa-loop-ch.c (copy_loop_headers): Use it.
* gcc.dg/guality/pr54693-2.c: New test.