re PR middle-end/30141 (nested function can produce invalid gimple)
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. From-SVN: r140346
This commit is contained in:
parent
9e6a14a4ee
commit
42ea03fb16
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
||||
2008-09-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR rtl-optimization/37489
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue