re PR debug/89463 (debug information for iterator of an empty loop is gone (at -O3))
authorRichard Biener <rguenther@suse.de>
Wed, 27 Mar 2019 09:31:53 +0000 (09:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 27 Mar 2019 09:31:53 +0000 (09:31 +0000)
commit6461f211e09415edd95315f4f9ff843f4f1d8eff
tree2edaf47454e9e2ec61d481e1111a7e475e9bbded
parentc686fcbc776ab4783860959b6cdfd6ffc72a4c97
re PR debug/89463 (debug information for iterator of an empty loop is gone (at -O3))

2019-03-27  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89463
* tree-ssa-dce.c (remove_dead_stmt): Take output vector to
queue edges to remove.
(eliminate_unnecessary_stmts): Remove dead PHIs alongside
dead stmts.  Delay edge removal until PHIs are removed to
make debug-stmt creation not confused by seemingly degenerate
PHIs.

* gcc.dg/guality/pr89463.c: New testcase.

From-SVN: r269961
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/pr89463.c [new file with mode: 0644]
gcc/tree-ssa-dce.c