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

            Bug ID: 64462
           Summary: ICE while compiling lambda using local constexpr
                    reference variable
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lunow at math dot hu-berlin.de

The following Code triggers the crash (C++11 mode)

int x = 0;
int z;

int main() {
  constexpr int& y = x;
  [=] { z = y; }();
}

$ g++ gccbug.cpp -std=c++11
gccbug.cpp: In lambda function:
gccbug.cpp:7:11: internal compiler error: in cp_build_modify_expr, at
cp/typeck.c:7446
   [=] { z = y; }();
           ^
Please submit a full bug report,
...

Reply via email to