https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105667
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[C++20] templated lambas in |[C++20] lambas in template
|template argument sometimes |argument sometimes causes
|causes an ICE (seg fault) |an ICE (seg fault)
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. something slightly shorter, changing the class template to a
function template and changing some other things slightly too.
problem is related to lamba as a template argument.
template<auto f>
struct h {typedef int type;};
template<class Types>
struct t{};
template<typename Ts>
void crash() {
using Types = typename h<[]() {}>::type;
auto f = [&] <int i> () {
using type = t<Types>;
};
f.template operator()<1>();
}
int main() {
crash<int>();
return 0;
}