http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50431
Bug #: 50431 Summary: lambda bug for array size def Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zhud...@163.com This code is OK, OK: constexpr auto sz = []()->long { return 100L; }; int arr1[sz()]; int arr2[[]()->long { return 100L; }()]; But these code will failed for g++ compiler 4.6.1. BUG1: auto sz = []()->constexpr long { return 100L; }; int arr[[]()->long { return 100L; }]; BUG2: //feature.cpp:51:38: internal compiler error: Segmentation fault int arr[[]()->long { return 100L; }];