aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2019-02-05 23:28:25 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-02-05 23:28:25 +0100
commitd397e3948ec945c8c3b4dc695e1b0b5820365a39 (patch)
treed28c490bd10459d8af9c855f87d56d907710a30b /gcc/cp/lambda.c
parent216090cc0fb7dc4de5fa9176860c845d5646c6b7 (diff)
downloadgcc-d397e3948ec945c8c3b4dc695e1b0b5820365a39.zip
gcc-d397e3948ec945c8c3b4dc695e1b0b5820365a39.tar.gz
gcc-d397e3948ec945c8c3b4dc695e1b0b5820365a39.tar.bz2
re PR c++/89187 (ICE in initialize_argument_information, at calls.c:2023)
PR c++/89187 * optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on PARM_DECLs of the thunk. * lambda.c (maybe_add_lambda_conv_op): Likewise. * g++.dg/opt/pr89187.C: New test. From-SVN: r268564
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index c31b06e..2290fe0 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -1130,6 +1130,9 @@ maybe_add_lambda_conv_op (tree type)
{
tree new_node = copy_node (src);
+ /* Clear TREE_ADDRESSABLE on thunk arguments. */
+ TREE_ADDRESSABLE (new_node) = 0;
+
if (!fn_args)
fn_args = tgt = new_node;
else