[Bug rtl-optimization/123295] [16 Regression] ICE: SIGSEGV in volatile_insn_p (rtlanal.cc:2961) with -O -g2 since r16-160-ge6f89d78c1a752
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 29 00:22:19 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123295
--- Comment #8 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:c93e74a838c93969ddecaae47b552f14f913f9fd
commit r16-6425-gc93e74a838c93969ddecaae47b552f14f913f9fd
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Fri Dec 26 14:30:22 2025 -0800
LRA: Fix eliminate regs into a subreg inside a debug insn [PR123295]
So the problem here is during LRA we are eliminating argp and trying to
simplify the RTL as we go but inside a debug insn, almost all subreg
are valid due to gen_lowpart_for_debug done during debug insn
simplification.
So simplify_gen_subreg will fail on some subregs and return null.
This causes problems later on. The solution is create a raw SUBREG
like what is done in lra_substitute_pseudo for debug insns.
Bootstrapped and tested on x86_64-linux-gnu.
PR rtl-optimization/123295
gcc/ChangeLog:
* lra-eliminations.cc (lra_eliminate_regs_1): For a debug
insn, create a raw SUBREG if simplify_gen_subreg fails.
gcc/testsuite/ChangeLog:
* gcc.dg/pr123295-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list