diff options
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index 38500b1..a0a80df 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -451,11 +451,12 @@ build_capture_proxy (tree member, tree init) { if (PACK_EXPANSION_P (init)) init = PACK_EXPANSION_PATTERN (init); - if (INDIRECT_REF_P (init)) - init = TREE_OPERAND (init, 0); - STRIP_NOPS (init); } + if (INDIRECT_REF_P (init)) + init = TREE_OPERAND (init, 0); + STRIP_NOPS (init); + gcc_assert (VAR_P (init) || TREE_CODE (init) == PARM_DECL); while (is_normal_capture_proxy (init)) init = DECL_CAPTURED_VARIABLE (init); |