https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127822
Bug ID: 127822
Summary: ICE in convert_generic_types_to_packs, at cp/pt.cc
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: s.kimura.h41104 at gmail dot com
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/T8a17a4ez
Reproducer:
```
template <typename T, typename U> constexpr bool foo = false;
template <typename... T, typename U>
concept C = foo<T, U>;
void bar(C<char> auto... x);
```
Backtrace:
<source>:3:13: error: parameter packs not expanded with '...':
3 | concept C = foo<T, U>;
| ^~~~~~~~~
<source>:3:13: note: 'T'
<source>:5:18: error: wrong number of template arguments (2, should be at least
1)
5 | void bar(C<char> auto... x);
| ^~~~
<source>:3:9: note: provided for 'template<class ... T, class U> concept C'
3 | concept C = foo<T, U>;
| ^
<source>:5:26: internal compiler error: in convert_generic_types_to_packs, at
cp/pt.cc:33507
5 | void bar(C<char> auto... x);
| ^
0x2c5a5f8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2c4f23b internal_error(char const*, ...)
???:0
0xb9d282 fancy_abort(char const*, int, char const*)
???:0
0xdf7803 c_parse_file()
???:0
0xf8b8e9 c_common_parse_file()
???:0
This ICE goes back to gcc-16:
https://godbolt.org/z/rEh9cq519