http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47242
Summary: [C++0x] ICE: tree check: expected field_decl, have error_mark in build_lambda_object, at cp/semantics.c:7604 on invalid lambda function Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 22937 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22937 reduced testcase Compiler output: $ gcc -std=c++0x pr47242.C pr47242.C: In function 'void bar()': pr47242.C:6:4: error: 'i' was not declared in this scope pr47242.C: In function 'void bar() [with <template-parameter-1-1> = int]': pr47242.C:12:12: instantiated from here pr47242.C:6:3: error: using invalid field 'bar()::<lambda()>::__i' pr47242.C:6:3: internal compiler error: tree check: expected field_decl, have error_mark in build_lambda_object, at cp/semantics.c:7604 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r168618 - crash 4.5 r168062 - crash