[Bug tree-optimization/121103] [15/16 Regression] ICE at O2: in single_succ_edge with noreturn on memmove
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 20 08:46:25 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121103
--- Comment #9 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:36a5d12cca2bc3b6d06432f10206188c1799479e
commit r16-7598-g36a5d12cca2bc3b6d06432f10206188c1799479e
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Sun Feb 1 21:08:54 2026 -0800
fold/dse: Don't simplify/remove noreturn functions [PR121103]
This fixes 2 related bugs. The user marks memmove as noreturn
so when we simplify the memmove to a memory load/store there
is no longer a statement that can alter the CFG and things go
down hill.
The same is true for removing the call in DSE.
So the fix is not to simplify/take into account the call from
gimple-fold and DSE.
changes since v1:
* v2: Use gimple_call_ctrl_altering_p instead of flags.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/121103
gcc/ChangeLog:
* gimple-fold.cc (gimple_fold_call): Don't simplify
noreturn functions.
* tree-ssa-dse.cc (dse_optimize_stmt): Don't handle
calls to noreturn functions.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr121103-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list