[Bug c++/90215] [8/9 Regression] ICE with lambda in fold expression over comma and assignment

2019-04-24 Thread vittorio.romeo at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90215

--- Comment #4 from Vittorio Romeo  ---
Simplified quite a lot, removed `` dependency:
https://gcc.godbolt.org/z/6uNcCN

struct X
{
template 
void f(F f)
{
f(0);
}
};

template 
void bug(Xs... xs)
{
int i;

[&](auto&... ys)
{   
(xs.f([&](auto)
{
ys;
}), ...);
}(i);
}

int main()
{
bug(X{});
}

[Bug c++/90215] [8/9 Regression] ICE with lambda in fold expression over comma and assignment

2019-04-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90215

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/90215] [8/9 Regression] ICE with lambda in fold expression over comma and assignment

2019-04-24 Thread vittorio.romeo at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90215

--- Comment #3 from Vittorio Romeo  ---
Changing the lambda to the following

std::apply([](auto&... ys)
{   
(xs.f([](auto y)
{
ys = y;
}), ...);
}, t);

produces a different ICE:

:20:9: internal compiler error: Segmentation fault
 20 | (xs.f([](auto y)
| ^

https://gcc.godbolt.org/z/hp2hMN