summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-03 21:57:08 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-03 21:57:08 +0000
commit5c3af85ce38124c0a0cdc5e1896d563386d74058 (patch)
tree53e25d711d1130e3fded2395bdbce1e6aef3db0a /gcc/gimplify.c
parent4d6847c42068fc36c1ee317f33e857d0591ed090 (diff)
downloadgcc-5c3af85ce38124c0a0cdc5e1896d563386d74058.tar.gz
PR c++/25979
* gimplify.c (gimplify_modify_expr_rhs): Disable *& optimization for now. PR middle-end/25977 * gimplify.c (gimplify_modify_expr_rhs): It's not always safe to do RVO on the return slot if it's an NRV. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 876160955f5..f64b1cbc8a8 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3190,6 +3190,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
while (ret != GS_UNHANDLED)
switch (TREE_CODE (*from_p))
{
+#if 0
case INDIRECT_REF:
{
/* If we have code like
@@ -3211,6 +3212,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
ret = GS_UNHANDLED;
break;
}
+#endif
case TARGET_EXPR:
{
@@ -3272,8 +3274,9 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
bool use_target;
if (TREE_CODE (*to_p) == RESULT_DECL
+ && DECL_NAME (*to_p) == NULL_TREE
&& needs_to_live_in_memory (*to_p))
- /* It's always OK to use the return slot directly. */
+ /* It's OK to use the return slot directly unless it's an NRV. */
use_target = true;
else if (!is_gimple_non_addressable (*to_p))
/* Don't use the original target if it's already addressable;