[Bug middle-end/126341] [17 Regression] ICE: in set_rtl, at cfgexpand.cc:181 with -fnon-call-exceptions -ftree-coalesce-vars
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 21 14:40:56 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126341
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kyrylo Tkachov <ktkachov@gcc.gnu.org>:
https://gcc.gnu.org/g:7459f9136500bfb881902834d56fb110b77909f2
commit r17-2590-g7459f9136500bfb881902834d56fb110b77909f2
Author: Kyrylo Tkachov <ktkachov@nvidia.com>
Date: Tue Jul 21 02:44:06 2026 -0700
out-of-SSA: Preserve storage for split partition decls [PR126341]
create_tmp_var_raw marks a replacement declaration as ignored. At -O0,
this can change use_register_for_decl from memory for the original user
declaration to a pseudo for the replacement. A partition can already own
memory from a parameter default definition, which then makes set_rtl reject
that memory for another name in the partition.
If the replacement would use a register, copy DECL_IGNORED_P so it keeps
the
storage choice made during coalescing. Keep declarations that already use
memory unchanged. Add a checking assertion for the memory invariant.
Bootstrapped and tested on aarch64-none-linux-gnu and x86_64-linux.
gcc/ChangeLog:
PR middle-end/126341
* tree-outof-ssa.cc (split_overlapping_partition_decls): Preserve
DECL_IGNORED_P. Check that the replacement uses memory.
gcc/testsuite/ChangeLog:
PR middle-end/126341
* gcc.dg/pr126341.c: New test.
Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
More information about the Gcc-bugs
mailing list