aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-08-19 13:00:51 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-08-19 13:00:51 -0400
commitce3beba3df013a2ebffbde6bf691f396dd968f61 (patch)
tree07707b32a91d6054569c09547fee746ce8b65038 /gcc/gimplify.c
parent2c5df20f2ee3af837efdcf9a384a5fb600791050 (diff)
downloadgcc-ce3beba3df013a2ebffbde6bf691f396dd968f61.zip
gcc-ce3beba3df013a2ebffbde6bf691f396dd968f61.tar.gz
gcc-ce3beba3df013a2ebffbde6bf691f396dd968f61.tar.bz2
re PR middle-end/45307 (Stores expanding to no RTL not removed by tree optimizers, Empty ctors/dtors not eliminated)
PR c++/45307 * gimplify.c (gimplify_init_constructor): Just return GS_UNHANDLED if ctor is empty. (gimplify_modify_expr_rhs): Adjust. From-SVN: r163380
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 8b97ee3..7e33666 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4237,6 +4237,10 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p,
break;
case CONSTRUCTOR:
+ /* If we already made some changes, let the front end have a
+ crack at this before we break it down. */
+ if (ret != GS_UNHANDLED)
+ break;
/* If we're initializing from a CONSTRUCTOR, break this into
individual MODIFY_EXPRs. */
return gimplify_init_constructor (expr_p, pre_p, post_p, want_value,