https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124783
Bug ID: 124783
Summary: ICE: c++26 pack expansion w/ LTO crashes
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marcel at laverdet dot com
Target Milestone: ---
https://godbolt.org/z/odc4joK31
-----
#include <tuple>
auto invoke(auto tup) {
const auto [... args ] = tup;
}
auto main() -> int {
invoke(std::tuple{});
return 0;
}
-----
root[16:55:37] [/workspace] $ /root/gcc-16/bin/g++ -std=c++26 -flto=auto -c
a.cc
during IPA pass: modref
a.cc:10:1: internal compiler error: tree code ‘decltype_type’ is not supported
in LTO streams
10 | }
| ^
0x26d01f3 internal_error(char const*, ...)
/gcc-out/../gcc/gcc/diagnostic-global-context.cc:787
0x122d807 lto_write_tree
/gcc-out/../gcc/gcc/lto-streamer-out.cc:560
0x122d807 lto_output_tree_1
/gcc-out/../gcc/gcc/lto-streamer-out.cc:598
0x123521f DFS::DFS(output_block*, tree_node*, bool, bool, bool)
/gcc-out/../gcc/gcc/lto-streamer-out.cc:898
0x123603b lto_output_tree(output_block*, tree_node*, bool, bool)
/gcc-out/../gcc/gcc/lto-streamer-out.cc:1887
0x122c2ab write_global_stream
/gcc-out/../gcc/gcc/lto-streamer-out.cc:2956
0x1239233 lto_output_decl_state_streams(output_block*, lto_out_decl_state*)
/gcc-out/../gcc/gcc/lto-streamer-out.cc:3003
0x1239233 produce_asm_for_decls()
/gcc-out/../gcc/gcc/lto-streamer-out.cc:3427
0x12df0f7 write_lto
/gcc-out/../gcc/gcc/passes.cc:2796
0x12df0f7 ipa_write_summaries_1
/gcc-out/../gcc/gcc/passes.cc:2859
0x12df0f7 ipa_write_summaries()
/gcc-out/../gcc/gcc/passes.cc:2919
0xe330b7 ipa_passes
/gcc-out/../gcc/gcc/cgraphunit.cc:2292
0xe330b7 symbol_table::compile()
/gcc-out/../gcc/gcc/cgraphunit.cc:2367
0xe36247 symbol_table::compile()
/gcc-out/../gcc/gcc/cgraphunit.cc:2348
0xe36247 symbol_table::finalize_compilation_unit()
/gcc-out/../gcc/gcc/cgraphunit.cc:2626
/root/gcc-16/libexec/gcc/aarch64-unknown-linux-gnu/16.0.1/cc1plus -quiet
-imultiarch aarch64-linux-gnu -D_GNU_SOURCE a.cc -quiet -dumpbase a.cc
-dumpbase-ext .cc -mlittle-endian -mabi=lp64 -std=c++26 -flto=auto -o
/tmp/cc13xHNt.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.