{
tree t;
- t = create_tmp_var_for (info, TREE_TYPE (TREE_TYPE (gimple_call_fn (call))),
- NULL);
+ t = create_tmp_var_for (info, gimple_call_return_type (call), NULL);
gimple_call_set_lhs (call, t);
if (! gsi_end_p (*gsi))
gimple_set_location (call, gimple_location (gsi_stmt (*gsi)));
switch (gimple_code (stmt))
{
case GIMPLE_CALL:
- decl = gimple_call_fn (stmt);
- if (TREE_CODE (decl) != FUNCTION_DECL)
+ decl = gimple_call_fndecl (stmt);
+ if (!decl)
break;
target_context = decl_function_context (decl);
if (target_context && !DECL_NO_STATIC_CHAIN (decl))
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);
+ }
}
}