https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122884
--- Comment #3 from C Runge <rungecc at gmail dot com> ---
The `requires requires` has a different backtrace:
```
<source>: In substitution of 'template<class Self, class ... Args>
demux_t::operator()<<lambda(auto:1, auto:2)>, <lambda(auto:3 ...)>,
<lambda(auto:4 ...)> >(<lambda(auto:1, auto:2)>&&, <lambda(auto:3 ...)>&&,
<lambda(auto:4 ...)>&&) requires requires{<lambda>;}::<lambda(this Self&&,
Args&& ...)> [with Self = demux_t::operator()<<lambda(auto:1, auto:2)>,
<lambda(auto:3 ...)>, <lambda(auto:4 ...)> >(<lambda(auto:1, auto:2)>&&,
<lambda(auto:3 ...)>&&, <lambda(auto:4 ...)>&&) requires
requires{<lambda>;}::<lambda(this Self&&, Args&& ...)>; Args = {int, int}]':
required from here
<source>:35:47:
33 | static_assert(demux([](auto x, auto y) { return x + y; },
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 | [](auto...) { return 1; },
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
35 | [](auto...) { return 2; })(1, 2) == 3);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
<source>:23:41: internal compiler error: tree check: accessed elt 2 of
'tree_vec' with 0 elts in tsubst_pack_expansion, at cp/pt.cc:14002
23 | return [fn{fn}, ... slots{slots}]<class Self, class... Args>(
| ^
0x2914fd8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2909d9b internal_error(char const*, ...)
???:0
0xa15ad5 tree_vec_elt_check_failed(int, int, char const*, int, char const*)
???:0
0xd90ad9 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
???:0
0xd94154 tsubst_argument_pack(tree_node*, tree_node*, int, tree_node*)
???:0
0xd90a74 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
???:0
0xd83aa9 tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0xd84a1b tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0xd84095 tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0xba0f66 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
???:0
0xba23b8 constraints_satisfied_p(tree_node*, tree_node*)
???:0
0xdb0c01 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
???:0
0xb4c9c2 build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
???:0
0xdd3265 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
???:0
0xd4c213 c_parse_file()
???:0
0xebbf99 c_common_parse_file()
???: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.
Compiler returned: 1
```
May be a dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120136, not sure.