aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-04-03 01:07:36 -0400
committerJason Merrill <jason@redhat.com>2021-04-03 01:54:03 -0400
commit04771106cda8dca2c8b975fd4648933679455b8f (patch)
treee7f647a1c2791495e4c14eb76e60b1dea5bfdb65 /libgcc
parent7c3ba2145ceddb0fd7f85fbf27f8db81896527d1 (diff)
downloadgcc-04771106cda8dca2c8b975fd4648933679455b8f.zip
gcc-04771106cda8dca2c8b975fd4648933679455b8f.tar.gz
gcc-04771106cda8dca2c8b975fd4648933679455b8f.tar.bz2
c++: NRV in lambda in template [PR91217]
tsubst_lambda_expr was producing a function with two blocks that claimed to be the outermost block in the function body, one from the call to start_lambda_function in tsubst_lambda_expr, and one from tsubsting the block added by start_lambda_function when we first parsed the lambda. This messed with the named return value optimization, which only works for variables in the outermost block. gcc/cp/ChangeLog: PR c++/91217 * pt.c (tsubst_lambda_expr): Skip the body block from DECL_SAVED_TREE. gcc/testsuite/ChangeLog: PR c++/91217 * g++.dg/opt/nrv20.C: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions