aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-06-21 07:54:29 -0400
committerPatrick Palka <ppalka@redhat.com>2021-06-21 07:54:29 -0400
commit21761d2b2b01f6cef4287c646845f6b3006546aa (patch)
tree001f0fe3f5626d1c87adb930b584484eefe8ccc7 /gcc/tree-vectorizer.h
parentde31f5445b12fd9ab9969dc536d821fe6f0edad0 (diff)
downloadgcc-21761d2b2b01f6cef4287c646845f6b3006546aa.zip
gcc-21761d2b2b01f6cef4287c646845f6b3006546aa.tar.gz
gcc-21761d2b2b01f6cef4287c646845f6b3006546aa.tar.bz2
c++: REF_PARENTHESIZED_P wrapper inhibiting NRVO [PR67302]
Here, in C++14 or later, we remember the parentheses around 'a' in the return statement by using a REF_PARENTHESIZED_P wrapper, which ends up inhibiting NRVO because we don't look through this wrapper before checking the conditions for NRVO. This patch fixes this by calling maybe_undo_parenthesized_ref sooner in check_return_expr. PR c++/67302 gcc/cp/ChangeLog: * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref sooner, before the NRVO handling. gcc/testsuite/ChangeLog: * g++.dg/opt/nrv21.C: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions