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

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

https://gcc.gnu.org/g:86637cc395bfd2d3349d81c794e4695c05f6008f

commit r16-9913-g86637cc395bfd2d3349d81c794e4695c05f6008f
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.

    (cherry picked from commit f035e26ef7eee00fd0028531b087e4d2b72c6695)

Reply via email to