http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57247
Bug ID: 57247 Summary: ICE when referencing 'this' in lambda function inside array Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bryan.ostergaard at gmail dot com Created attachment 30097 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30097&action=edit Preprocessed source producing ICE The following code gives an ICE. Preprocessed code attached to bug. #include <functional> struct foo { std::function<void ()> bar[] { [&] { this; } }; };