aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-06-16 10:48:56 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-06-16 10:48:56 -0400
commit63d02f058f0ba3c1d00c2a9f12cac86eeec00b66 (patch)
treeaff7fc914e78f2fd2eb3926d7ea57cd8d43727b5 /gcc/cp/semantics.c
parentff09c88dd183154206764fb841a87856f5b2f94d (diff)
downloadgcc-63d02f058f0ba3c1d00c2a9f12cac86eeec00b66.zip
gcc-63d02f058f0ba3c1d00c2a9f12cac86eeec00b66.tar.gz
gcc-63d02f058f0ba3c1d00c2a9f12cac86eeec00b66.tar.bz2
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
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c2
1 files changed, 2 insertions, 0 deletions
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;