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

            Bug ID: 121842
           Summary: ICE: in coerce_template_parms, at cp/pt.cc:9283
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stevenxia990430 at gmail dot com
  Target Milestone: ---

The following invalid program reports an internal compiler error: in
coerce_template_parms, at cp/pt.cc:9283

To quickly reproduce: https://gcc.godbolt.org/z/cdKf4G9qb
```
#include <concepts>

template<typename... Ts, typename... Ts>
concept HasString = true;
template<typename... Ts>
concept NotHasString = HasString<Ts...>;

int main() {
    return 0;
}
```

Note that if we do not have the same name (i.e., `template<typename... Ts,
typename... Ts>` to `template<typename... Ts, typename... T>`) the program
compiles correctly.

Reply via email to