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

            Bug ID: 79640
           Summary: ICE with generic lambda expression
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid code snippet triggers an ICE since GCC 5.1.0:

=======================================
template<typename F> void foo(F f)
{
  f(1);
}

template<int> void bar()
{
  const int i = i;
  foo([] (auto) { sizeof(i); });
}

void baz() { bar<1>(); }
=======================================

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report, [etc.]

Reply via email to