https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123837
Bug ID: 123837
Summary: ICE: fails to produce LTO streams when using C++26
annotations
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tymi at tymi dot org
Target Milestone: ---
pp code:
```cpp
struct Tag
{};
[[=Tag{}]] int x {};
int main()
{
return 0;
}
```
CE link: https://godbolt.org/z/34Wqs9W4W
Diagnostics:
```
during IPA pass: modref
<source>:9:1: internal compiler error: tree code 'target_expr' is not supported
in LTO streams
9 | }
| ^
0x2952bb8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x29478fb internal_error(char const*, ...)
???:0
0x137c7b8 DFS::DFS(output_block*, tree_node*, bool, bool, bool)
???:0
0x137d5a4 lto_output_tree(output_block*, tree_node*, bool, bool)
???:0
0x1380b22 produce_asm_for_decls()
???:0
0x141bb9e ipa_write_summaries()
???:0
0xfc9996 symbol_table::finalize_compilation_unit()
???:0
/cefs/e2/e208000267cce234eb736ef3_gcc-trunk-20260127/bin/../libexec/gcc/x86_64-linux-gnu/16.0.1/cc1plus
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/e2/e208000267cce234eb736ef3_gcc-trunk-20260127/bin/../lib/gcc/x86_64-linux-gnu/16.0.1/
-D_GNU_SOURCE <source> -quiet -dumpdir /app/ -dumpbase output.cpp -dumpbase-ext
.cpp -masm=intel -mtune=generic -march=x86-64 -g -std=c++26
-fdiagnostics-color=always -fno-verbose-asm -freflection -flto -freport-bug -o
/app/output.s
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
Compiler returned: 1
```