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

--- Comment #21 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <[email protected]>:

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

commit r16-7696-ga9112128eef1c0455340c2aa3b64303072030746
Author: Andrew Pinski <[email protected]>
Date:   Sat Feb 21 14:38:12 2026 -0800

    fn-split: Insert new call after clobbers/debug stmt [PR110091]

    So for function splitting when we outlined the function, we
    should keep around the clobbers that were at the begining of
    the bb which will be outlined. So change the last stmt
    to where we split the bb for where the function call will be
    to be after the clobbers.

    Note we have to ignore the debug stmts here otherwise you would
    get a debug comparison failure.

    This also fixes some of the warnings about dangling-pointers because
    the clobbers are now correctly handled while function splitting.
    The testcases test for the cases where the dangling-pointers pointer
    warnings would show up too.

    Note only end of storage clobbers in this case.

    Bootstrapped and tested on x86_64-linux-gnu.

            PR tree-optimization/110091

    gcc/ChangeLog:

            * ipa-split.cc (split_function): Split after
            the clobbers/debug stmts rather than after the labels.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/pr110091-1.c: New test.
            * gcc.dg/tree-ssa/pr110091-2.c: New test.

    Signed-off-by: Andrew Pinski <[email protected]>

Reply via email to