https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124511

            Bug ID: 124511
           Summary: pack structured binding does not work with lto
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, lto
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Testcase:
```
struct a{int i;};
template<int=0>
int f()
{
  auto [... j] = a{};
  return j...[0];
}
int x = f();
```

Compile with `-std=c++26 -flto` and we get:
```

during IPA pass: modref
<source>:8:12: internal compiler error: tree code 'decltype_type' is not
supported in LTO streams
    8 | int x = f();
      |            ^
0x22634a8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x225c79b internal_error(char const*, ...)
        ???:0
0xee95b9 DFS::DFS(output_block*, tree_node*, bool, bool, bool)
        ???:0
0xeea3ef lto_output_tree(output_block*, tree_node*, bool, bool)
        ???:0
0xeed578 produce_asm_for_decls()
        ???:0
0xf7b5d4 ipa_write_summaries()
        ???:0
0xbaa7a6 symbol_table::finalize_compilation_unit()
        ???:0
```

Reply via email to