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; }