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

            Bug ID: 123237
           Summary: ICE: in write_type, at cp/mangle.cc:2744 (reflection)
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eczbek.void at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/G463dvqn3

```
template<typename T>
using A = [:^^T:];

int main() {
        []<typename T = int> requires(requires { A<T> {}; }) {}();
}
```

```
<source>:5:9: internal compiler error: in write_type, at cp/mangle.cc:2744
    5 |         []<typename T = int> requires(requires { A<T> {}; }) {}();
      |         ^
0x29279c8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x291c78b internal_error(char const*, ...)
        ???:0
0xb17704 fancy_abort(char const*, int, char const*)
        ???:0
0xc77979 mangle_decl(tree_node*)
        ???:0
0x18aded5 decl_assembler_name(tree_node*)
        ???:0
0x18d78c8 assign_assembler_name_if_needed(tree_node*)
        ???:0
0xfba87f cgraph_node::analyze()
        ???:0
0xfbdf21 symbol_table::finalize_compilation_unit()
        ???:0
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.
ASM generation compiler returned: 1
<source>:5:9: internal compiler error: in write_type, at cp/mangle.cc:2744
    5 |         []<typename T = int> requires(requires { A<T> {}; }) {}();
      |         ^
0x29279c8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x291c78b internal_error(char const*, ...)
        ???:0
0xb17704 fancy_abort(char const*, int, char const*)
        ???:0
0xc77979 mangle_decl(tree_node*)
        ???:0
0x18aded5 decl_assembler_name(tree_node*)
        ???:0
0x18d78c8 assign_assembler_name_if_needed(tree_node*)
        ???:0
0xfba87f cgraph_node::analyze()
        ???:0
0xfbdf21 symbol_table::finalize_compilation_unit()
        ???:0
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.
Execution build compiler returned: 1
Build failed
```

Reply via email to