https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128054

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

https://gcc.gnu.org/g:f035e26ef7eee00fd0028531b087e4d2b72c6695

commit r17-5462-gf035e26ef7eee00fd0028531b087e4d2b72c6695
Author: Richard Biener <[email protected]>
Date:   Wed Oct 21 15:40:53 2026 +0200

    tree-optimization/128054 - isolate path issue with multiple UBs

    The isolate path iteration scheme attempts to isolate a path exactly
    once, applying all transforms so the earliest will survive.  But it
    fails to associate later UBs to the correctly isolated path due to
    the way it iterates over PHIs and arguments.  The following changes
    the NULL dereference discovery to iterate over incoming edges
    (paths) so we clearly deal with UBs on the same path.

            PR tree-optimization/128054
            * gimple-ssa-isolate-paths.cc (find_implicit_erroneous_behavior):
            Iterate over edges and then PHIs for NULL dereference discovery.
            Duplicate each path exactly once and apply all transforms for
            UB on that edge to that duplicate.

            * gcc.dg/torture/pr128054.c: New testcase.

Reply via email to