diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 5da1725..1531582 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4730,24 +4730,23 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, if (ret == GS_ERROR) return GS_ERROR; - else if (want_value) + /* If we have gimplified both sides of the initializer but have + not emitted an assignment, do so now. */ + if (*expr_p) + { + tree lhs = TREE_OPERAND (*expr_p, 0); + tree rhs = TREE_OPERAND (*expr_p, 1); + gassign *init = gimple_build_assign (lhs, rhs); + gimplify_seq_add_stmt (pre_p, init); + } + if (want_value) { *expr_p = object; return GS_OK; } else { - /* If we have gimplified both sides of the initializer but have - not emitted an assignment, do so now. */ - if (*expr_p) - { - tree lhs = TREE_OPERAND (*expr_p, 0); - tree rhs = TREE_OPERAND (*expr_p, 1); - gassign *init = gimple_build_assign (lhs, rhs); - gimplify_seq_add_stmt (pre_p, init); - *expr_p = NULL; - } - + *expr_p = NULL; return GS_ALL_DONE; } } |