[Bug lto/121588] [13/14/15 regression] gcc 15.2.0 crashes when building u-boot 2022.07 with LTO since r15-7754
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 26 14:54:22 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121588
--- Comment #21 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Michal Jires
<mjires@gcc.gnu.org>:
https://gcc.gnu.org/g:c80b51b93a1abbf9b1e461f21d998ee87fe81927
commit r14-12335-gc80b51b93a1abbf9b1e461f21d998ee87fe81927
Author: Michal Jires <mjires@suse.cz>
Date: Fri Dec 19 17:09:16 2025 +0100
lto: Fix SegFault in ICF caused by missing body
During LTO symbol merging, weak symbols may be resolved to external
definition.
We reset the symbol, so the body might be released in unreachability
pass. But we didn't mark the symbol with body_removed, so ICF assumed
the body was still there causing SegFault.
PR lto/121588
gcc/lto/ChangeLog:
* lto-symtab.cc (lto_symtab_merge_symbols): Set body_removed
for symbols resolved outside of IR.
gcc/testsuite/ChangeLog:
* gcc.dg/lto/attr-weakref-2_0.c: New test.
* gcc.dg/lto/attr-weakref-2_1.c: New test.
(cherry picked from commit 8e4107a1b3d430f5d3938c8068c6cd512f661e95)
More information about the Gcc-bugs
mailing list