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

            Bug ID: 126017
           Summary: internal compiler error: tree code 'meta_type' is not
                    supported in LTO streams
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chzn at mail dot ustc.edu.cn
  Target Milestone: ---

https://godbolt.org/z/vjo64n3af

```
#include <meta>
consteval std::meta::info s() {
  struct S;
  consteval {define_aggregate(^^S,{data_member_spec(^^int,{.name="abc"})});}
  return ^^S;
}
struct T:[:s():]{};
int main() {
  T a;
}
```

compile with: -std=c++26 -freflection -flto

result in

```
during IPA pass: modref
<source>:10:1: internal compiler error: tree code 'meta_type' is not supported
in LTO streams
   10 | }
      | ^
0x2a1e6b8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x2a132fb internal_error(char const*, ...)
        ???:0
0x13ad89e DFS::DFS(output_block*, tree_node*, bool, bool, bool)
        ???:0
0x13ae9f4 lto_output_tree(output_block*, tree_node*, bool, bool)
        ???:0
0x13b200f produce_asm_for_decls()
        ???:0
0x145046e ipa_write_summaries()
        ???:0
0xff3ec6 symbol_table::finalize_compilation_unit()
        ???:0
/cefs/07/0710cefbc8745719d726ab07_gcc-trunk-20260627/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1plus
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/07/0710cefbc8745719d726ab07_gcc-trunk-20260627/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
-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 -o /app/output.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.
Compiler returned: 1
```

Reply via email to