summaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-23 22:36:54 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-23 22:36:54 +0000
commit88a3ea34080ad3087a8191fbf479543153175d59 (patch)
tree34eaec34d3588e09f9a77abba776266f124dc823 /gcc/cp/lambda.c
parent25e15aaed275cdfef34b3ee6eb3cb4b43a48d44f (diff)
parente65055a558093bd4fc0b1b0024b7814cc187b8e8 (diff)
downloadgccgo.tar.gz
Merge from trunk revision 257954.gccgo
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gccgo@257955 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 6b5bd800741..a0a80dfde5c 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -261,6 +261,7 @@ is_capture_proxy (tree decl)
return (VAR_P (decl)
&& DECL_HAS_VALUE_EXPR_P (decl)
&& !DECL_ANON_UNION_VAR_P (decl)
+ && !DECL_DECOMPOSITION_P (decl)
&& LAMBDA_FUNCTION_P (DECL_CONTEXT (decl)));
}
@@ -450,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);