[Bug tree-optimization/116922] [12/13 Regression] ICE: in op_iter_init, at ssa-iterators.h:604 with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116922 --- Comment #8 from GCC Commits --- The releases/gcc-13 branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:f6f61d99f576c1caef507f86f7feec0420cc0a43 commit r13-9526-gf6f61d99f576c1caef507f86f7feec0420cc0a43 Author: Andrew Pinski Date: Tue Oct 1 14:48:19 2024 -0700 backprop: Fix deleting of a phi node [PR116922] The problem here is remove_unused_var is called on a name that is defined by a phi node but it deletes it like removing a normal statement. remove_phi_node should be called rather than gsi_remove for phinodes. Note there is a possibility of using simple_dce_from_worklist instead but that is for another day. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/116922 gcc/ChangeLog: * gimple-ssa-backprop.cc (remove_unused_var): Handle phi nodes correctly. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116922.c: New test. Signed-off-by: Andrew Pinski (cherry picked from commit cea87c84eacdb422caeada734ba5138c994d7022)
[Bug tree-optimization/116922] [12/13 Regression] ICE: in op_iter_init, at ssa-iterators.h:604 with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116922 Andrew Pinski changed: What|Removed |Added Known to fail|14.2.1 | Summary|[12/13/14 Regression] ICE: |[12/13 Regression] ICE: in |in op_iter_init, at |op_iter_init, at |ssa-iterators.h:604 with|ssa-iterators.h:604 with |-Ofast |-Ofast Known to work||14.2.1 --- Comment #7 from Andrew Pinski --- Fixed for GCC 14.3.0 also.
