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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-10-08
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Slight more reduced:
```
template <typename T>
concept Ac = true;
template <int dim> struct V {};
template <typename T>
struct IsV {};
template <Ac auto a>
struct IsV<V<a>> {};
template <int i>
struct B {
  template <Ac auto b>
  void f(V<b>);
};
void crashing_function() { B<0>{}.f(V<0>{}); }
```

Trunk produces:
```
<source>: In substitution of 'template<auto [requires ::Ac<<placeholder>, >] b>
void B<0>::f(V<a>) [with auto [requires ::Ac<<placeholder>, >] b = <missing>]':
required from here
<source>:13:36:   
   13 | void crashing_function() { B<0>{}.f(V<0>{}); }
      |                            ~~~~~~~~^~~~~~~~
<source>:13:36: internal compiler error: tree check: accessed elt 1 of
'tree_vec' with -1 elts in add_to_template_args, at cp/pt.cc:612
0x28d4a08 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x28c993b internal_error(char const*, ...)
        ???:0
0xa0dee1 tree_vec_elt_check_failed(int, int, char const*, int, char const*)
        ???:0
0xd63fa8 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int, tree_node*)
        ???:0
0xda0591 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
        ???:0
0xb24e1b build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        ???:0
```

Reply via email to