https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228
--- Comment #28 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:b083203f053f1666e9cc1ded2abdf4e1688d1ec0 commit r14-2289-gb083203f053f1666e9cc1ded2abdf4e1688d1ec0 Author: Richard Biener <rguent...@suse.de> Date: Tue Jul 4 10:29:26 2023 +0200 tree-optimization/110228 - avoid undefs in ifcombine more thoroughly The following replaces the simplistic gimple_uses_undefined_value_p with the conservative mark_ssa_maybe_undefs approach as already used by LIM and IVOPTs. This is to avoid exposing an unconditional uninitialized read on a path from entry by if-combine. PR tree-optimization/110228 * tree-ssa-ifcombine.cc (pass_tree_ifcombine::execute): Mark SSA may-undefs. (bb_no_side_effects_p): Check stmt uses for undefs. * gcc.dg/torture/pr110228.c: New testcase. * gcc.dg/uninit-pr101912.c: Un-XFAIL.