diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-13 16:29:22 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-13 16:29:22 +0000 |
commit | a3f2662fc5ec011321736ee450d95f1909757ecb (patch) | |
tree | 949aa6eeca7ea04690a1c2b245d9a0982f407ddc /gcc/tree-nested.c | |
parent | ecb6ee6d51d27e3bb64d3b951511b53a6bee37d8 (diff) | |
download | gcc-a3f2662fc5ec011321736ee450d95f1909757ecb.tar.gz |
2008-09-13 Richard Guenther <rguenther@suse.de>
PR middle-end/30141
* tree-nested.c (finalize_nesting_tree_1): Generate valid
gimple stores for memory rhs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index cfa1dd4b1ee..8f9fec58cf6 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1995,6 +1995,15 @@ finalize_nesting_tree_1 (struct nesting_info *root) 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) + && is_gimple_reg_type (TREE_TYPE (x))) + { + gimple_stmt_iterator gsi = gsi_last (stmt_list); + x = init_tmp_var (root, x, &gsi); + gimple_assign_set_rhs1 (stmt, x); + } } } |