https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105801
--- Comment #1 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:8f4634fb82d5670183d0ee42de9dae3b55ab5087 commit r13-4678-g8f4634fb82d5670183d0ee42de9dae3b55ab5087 Author: Richard Biener <rguent...@suse.de> Date: Tue Dec 13 14:24:02 2022 +0100 tree-optimization/105801 - CCP and .DEFERRED_INIT This makes sure we treat .DEFERRED_INIT as producing UNDEFINED so we can continue optimizing uninitialized uses the same as without -ftrivial-auto-var-init=zero. For the testcase this means we catch the return 1 optimization opportunity at CCP rather than only at FRE which already does the right thing here. PR tree-optimization/105801 * tree-ssa-ccp.cc (likely_value): .DEFERRED_INIT produces UNDEFINED. * doc/invoke.texi (ftrivial-auto-var-init): Explicitely mention we treat variables without an initializer as undefined also for optimization purposes. * gcc.dg/tree-ssa/ssa-ccp-43.c: New testcase.