]> git.ipfire.org Git - thirdparty/gcc.git/commit
free-lang-data: Remove C++ annotations [PR123837]
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Jan 2026 08:48:10 +0000 (09:48 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 28 Jan 2026 08:48:10 +0000 (09:48 +0100)
commit5c2a5bfcd4e62daeb7d7f25db088816fd1d54194
tree1130b12f08b069c5a2b3a9d76ff825304f4a17d6
parent5957ce932fc83b778d6881a375d50147ac6ca9bd
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.
gcc/ipa-free-lang-data.cc
gcc/testsuite/g++.dg/reflect/annotations9.C [new file with mode: 0644]