https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385
--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Comment on attachment 48302 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48302 Untested fix + /* IPA-SRA does not analyze other types of statements. */ + gcc_unreachable (); Won't this ICE on any is_gimple_debug stmt? Those should be just ignored and normal SSA_NAME handling should DTRT for those. As for PHIs, can you just gsi_remove them? Plus, I think in isra_track_scalar_value_uses for non-is_gimple_{debug,call} we should punt if !flag_tree_dce, i.e. when user asked not to perform dead code elimination. Though, guess that hunk should be added only after this is tested (and perhaps the testcase or its copy should use -fdisable-tree-dce or whatever other way to avoid doing DCE even when flag_tree_dce is non-zero.