From 63d02f058f0ba3c1d00c2a9f12cac86eeec00b66 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 16 Jun 2015 10:48:56 -0400 Subject: re PR c++/66387 (ICE in make_decl_rtl with lambda) PR c++/66387 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref. From-SVN: r224521 --- gcc/cp/semantics.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/cp/semantics.c') diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 59ec9047..a1519b9 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3103,6 +3103,8 @@ process_outer_var_ref (tree decl, tsubst_flags_t complain) if (cp_unevaluated_operand) /* It's not a use (3.2) if we're in an unevaluated context. */ return decl; + if (decl == error_mark_node) + return decl; tree context = DECL_CONTEXT (decl); tree containing_function = current_function_decl; -- cgit v1.1