https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
Bug ID: 98500
Summary: ICE template template parameter with default parameter
lambda
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bastien.penavayre at epitech dot eu
Target Milestone: ---
The following causes an ICE:
template<auto> struct X {};
template<template<auto=[]{}> class H = X, class = H<>>
struct A
{
};
static_assert(sizeof(A<>));
Message:
<source>:5:24: internal compiler error: in tsubst, at cp/pt.c:15258
5 | template<template<auto=[]{}> class H = X, class = H<>>
| ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Occurs from GCC 9.1 to trunk, tested through compiler explorer:
gcc 9.1: https://godbolt.org/z/ad7Gox
gcc trunk: https://godbolt.org/z/K367rj
Is probably related to the following tickets:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97610
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96908
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93595