[Bug c++/54250] New: Segmentation fault when decltype of a struct field is used in nested lambdas
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54250 Bug #: 54250 Summary: Segmentation fault when decltype of a struct field is used in nested lambdas Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: linespro...@gmail.com // this code causes segmentation fault during compilation // compiled with: g++ -std=c++0x // compiler version: 4.6.2 // note: uncommenting 'this' fixes the problem struct T { int a; int foo() { return [&]()->int { return [&](decltype(/*this->*/a) _)->int { return 1; }(a); }(); } }; int main() { return 0; }
[Bug c++/67608] New: ICE when capturing a local 2D array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67608 Bug ID: 67608 Summary: ICE when capturing a local 2D array Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: linesprower at gmail dot com Target Milestone: --- // command line: g++ -std=c++11 error.cpp // // compiler version: 4.9.2 (Ubuntu 14.04) // // compiler output: // error.cpp: In lambda function: // error.cpp:10:21: internal compiler error: in expand_expr_real_1, at expr.c:9454 //seen[r][c] = true; // ^ class Test { const int k = 50; public: void test() { bool seen[k][k]; auto trace = [&](int r, int c) { seen[r][c] = true; }; trace(5, 5); } }; int main() { Test t; t.test(); return 0; }