tree-optimization/109327 - forwprop stmt removal issue
authorRichard Biener <rguenther@suse.de>
Wed, 29 Mar 2023 07:51:58 +0000 (09:51 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 29 Mar 2023 08:34:22 +0000 (10:34 +0200)
commit7fd1d28d2436065da7fc0fe01d787fcdf3c14b83
treea35d1e2034305e0b4a5a74636e325d683d0ee397
parent36330e2e95564a360e6dbcfb4e7566d5c2177415
tree-optimization/109327 - forwprop stmt removal issue

There's interfering between the to_removed queue and other mechanisms
removing stmts, in this case remove_prop_source_from_use.  The following
makes the to_remove queue draining more permissive.

PR tree-optimization/109327
* tree-ssa-forwprop.cc (pass_forwprop::execute): Deal with
already removed stmts when draining to_remove.

* gcc.dg/pr109327.c: New testcase.
gcc/testsuite/gcc.dg/pr109327.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.cc