https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123300
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <[email protected]>: https://gcc.gnu.org/g:849b8f250c6e2a441c46ef1c6fcab7041cd25e03 commit r16-6551-g849b8f250c6e2a441c46ef1c6fcab7041cd25e03 Author: Andrew MacLeod <[email protected]> Date: Tue Jan 6 10:14:47 2026 -0500 Early builtin_unreachable removal must examine dependencies. Even if all uses of a name are dominated by the unreachable branch, recomputation of a value in the defintion of a name might be reachable. PR tree-optimization/123300 gcc/ * gimple-range-gori.cc (gori_map::exports_and_deps): New. * gimple-range-gori.h (exports_and_deps): New prototype. (FOR_EACH_GORI_EXPORT_AND_DEP_NAME): New macro. * tree-vrp.cc (remove_unreachable:remove_unreachable): Initialize m_tmp bitmap. (remove_unreachable:~remove_unreachable): Dispose of m_tmp bitmap. (remove_unreachable:fully_replaceable): Move from static function and check reachability of exports and dependencies. gcc/testsuite/ * gcc.dg/pr123300.c: New.
