[Bug ipa/122458] static function is removed even when referred from extended toplevel asm
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 11 22:09:44 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122458
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Michal Jires <mjires@gcc.gnu.org>:
https://gcc.gnu.org/g:c8b6ac52adc35d5ed8476fbf774995240de3d490
commit r16-6689-gc8b6ac52adc35d5ed8476fbf774995240de3d490
Author: Michal Jires <mjires@suse.cz>
Date: Sat Nov 15 19:54:11 2025 +0100
ipa: Analyze toplevel extended assembly
Analyzes references from toplevel extended assembly.
We cannot perform IPA optimizations with toplevel assembly, so
symtab_node only needs ref_by_asm to know that it should not be removed.
PR ipa/122458
gcc/ChangeLog:
* Makefile.in: Add new file.
* cgraph.h (analyze_toplevel_extended_asm): New.
* cgraphunit.cc (symbol_table::finalize_compilation_unit):
Call analyze_toplevel_extended_asm.
* asm-toplevel.cc: New file.
gcc/lto/ChangeLog:
* lto-common.cc (read_cgraph_and_symbols):
Call analyze_toplevel_extended_asm.
gcc/testsuite/ChangeLog:
* gcc.dg/ipa/pr122458.c: New test.
More information about the Gcc-bugs
mailing list