diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2014-08-25 16:15:49 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2014-08-25 16:15:49 +0000 |
commit | adcde84f0e085a0dbf08d15cc1fe5751062a19a4 (patch) | |
tree | c496903712d9138d05e0ce23b0886245f609a88e /gcc/tree-nested.c | |
parent | 423608115c8c93386979d6e90291dc5985601c04 (diff) | |
download | gcc-adcde84f0e085a0dbf08d15cc1fe5751062a19a4.zip gcc-adcde84f0e085a0dbf08d15cc1fe5751062a19a4.tar.gz gcc-adcde84f0e085a0dbf08d15cc1fe5751062a19a4.tar.bz2 |
Fix invalid gimple made by finalize_nesting_tree_1.
* tree-nested.c (finalize_nesting_tree_1): Initialize temporary earlier
rather than modifying the stmt.
From-SVN: r214434
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 82cec96..6ca594d 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -2715,10 +2715,6 @@ finalize_nesting_tree_1 (struct nesting_info *root) else x = p; - y = build3 (COMPONENT_REF, TREE_TYPE (field), - root->frame_decl, field, NULL_TREE); - stmt = gimple_build_assign (y, x); - gimple_seq_add_stmt (&stmt_list, stmt); /* If the assignment is from a non-register the stmt is not valid gimple. Make it so by using a temporary instead. */ if (!is_gimple_reg (x) @@ -2726,8 +2722,12 @@ finalize_nesting_tree_1 (struct nesting_info *root) { gimple_stmt_iterator gsi = gsi_last (stmt_list); x = init_tmp_var (root, x, &gsi); - gimple_assign_set_rhs1 (stmt, x); } + + y = build3 (COMPONENT_REF, TREE_TYPE (field), + root->frame_decl, field, NULL_TREE); + stmt = gimple_build_assign (y, x); + gimple_seq_add_stmt (&stmt_list, stmt); } } |