re PR tree-optimization/89595 (DOM miscompiles code)
authorRichard Biener <rguenther@suse.de>
Thu, 7 Mar 2019 12:46:44 +0000 (12:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 7 Mar 2019 12:46:44 +0000 (12:46 +0000)
commit1a438d160e1dc845882c2ecba99513a09a931623
treec8c58a79a894a803cb91f1b996eae5bbb7267ffe
parentf879f0e3f2667bd60b88603c5884364a0eed1fc4
re PR tree-optimization/89595 (DOM miscompiles code)

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

PR tree-optimization/89595
* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Take
stmt iterator as reference, take boolean output parameter to
indicate whether the stmt was removed and thus the iterator
already advanced.
(dom_opt_dom_walker::before_dom_children): Re-iterate over
stmts created by folding.

* gcc.dg/torture/pr89595.c: New testcase.

From-SVN: r269453
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr89595.c [new file with mode: 0644]
gcc/tree-ssa-dom.c