[Bug tree-optimization/110091] [13/14/15/16 Regression] bogus -Wdangling-pointer on non-pointer values
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 25 16:35:01 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110091
--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:b9c4b9e9f968585a0d6e9dda4e54ef21085797eb
commit r16-7697-gb9c4b9e9f968585a0d6e9dda4e54ef21085797eb
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Sat Feb 21 16:43:53 2026 -0800
fn-split: Move clobbers from the old exit bb to new call block after the
call [PR110091]
After outlinining the bbs for function splitting, we move the clobbers that
were in the
last bb to be after the newly calling function.
This allows for stack location sharing and more when the non split out part
is inlined
into another function.
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.
Changes since v1:
* v2: Add comments and add a call to unlink_stmt_vdef/release_ssa_name.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/110091
gcc/ChangeLog:
* ipa-split.cc (split_function): Find the bb
which is used for return in the outlined function.
Move the clobbers that are at the end of that bb
to be after the new call.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr110091-3.c: New test.
* gcc.dg/tree-ssa/pr110091-4.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list