G++ wasn't emitting sufficient debug info for the debugger to be able to map capture names to the fields in the closure while inside the lambda body. This patch changes the lambda implementation to generate proxy VAR_DECLs with DECL_VALUE_EXPR set so that they expand to the appropriate COMPONENT_REF for the capture field. This way the debugger doesn't need to know about any special lookup rules, it just works. Tested x86_64-pc-linux-gnu, applying to trunk.