[Bug c++/123837] ICE: fails to produce LTO streams when using C++26 annotations
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 28 08:49:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123837
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:5c2a5bfcd4e62daeb7d7f25db088816fd1d54194
commit r16-7101-g5c2a5bfcd4e62daeb7d7f25db088816fd1d54194
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Jan 28 09:48:10 2026 +0100
free-lang-data: Remove C++ annotations [PR123837]
As mentioned in the PR and reproduced on the testcase, we ICE during
LTO streaming because C++ annotation arguments can contain trees LTO
streaming doesn't handle.
We don't really need annotations when the FE is done with the whole
TU, annotations are always TU local and not exposed to the rest and
used in consteval only stuff, so the following patch just removes
all annotations at free-lang-data time.
2026-01-28 Jakub Jelinek <jakub@redhat.com>
PR c++/123837
* ipa-free-lang-data.cc (find_decls_types_r): Remove C++
annotations
from {DECL,TYPE}_ATRIBUTES.
* g++.dg/reflect/annotations9.C: New test.
More information about the Gcc-bugs
mailing list