[Bug c++/70691] New: internal compiler error: Segmentation fault with lambda

2016-04-16 Thread cornelius.mika at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70691

Bug ID: 70691
   Summary: internal compiler error: Segmentation fault with
lambda
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: cornelius.mika at gmail dot com
  Target Milestone: ---

gcc -std=c++14 repro.cc

[Bug c++/70691] internal compiler error: Segmentation fault with lambda

2016-04-16 Thread cornelius.mika at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70691

--- Comment #1 from cornelius.mika at gmail dot com ---
Created attachment 38287
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38287&action=edit
repro

[Bug c++/70691] internal compiler error: Segmentation fault with lambda

2016-04-16 Thread cornelius.mika at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70691

--- Comment #2 from cornelius.mika at gmail dot com ---
Comment on attachment 38287
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38287
repro

>template 
>void demoError(int x, F f)
>{
>const int y = x;
>
>auto lambda = [=](auto g) {
>for (int i = 0; i < y; ++i) {
>g();
>}
>return 0;
>};
>
>for (int i = 0; i < 1; ++i) {
>lambda(f);
>}
>}
>
>int main(int argc, char **argv)
>{
>(void)argc;
>(void)argv;
>
>demoError(1, [] { });
>
>return 0;
>}

[Bug c++/70691] internal compiler error: Segmentation fault with lambda

2016-04-16 Thread cornelius.mika at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70691

--- Comment #3 from cornelius.mika at gmail dot com ---
This bug is fixed in GCC 6.