aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-10-18 15:33:12 +0000
committerJakub Jelinek <jakub@redhat.com>2011-10-18 15:33:12 +0000
commitd893a3860a3c0c58db07f791ce57e710ed619b54 (patch)
tree05f6b704bb1887ad24ae7f4de048853336da2ec3 /gcc/function.c
parent2cd31772305a4307524355f6d8386f2563699ae3 (diff)
PR tree-optimization/50735
* function.c (gimplify_parameters): Use create_tmp_var instead of create_tmp_reg. If parm is not TREE_ADDRESSABLE and type is complex or vector type, set DECL_GIMPLE_REG_P. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@180154 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index c3702fb3419..dc1684a6128 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3617,7 +3617,7 @@ gimplify_parameters (void)
&& compare_tree_int (DECL_SIZE_UNIT (parm),
STACK_CHECK_MAX_VAR_SIZE) > 0))
{
- local = create_tmp_reg (type, get_name (parm));
+ local = create_tmp_var (type, get_name (parm));
DECL_IGNORED_P (local) = 0;
/* If PARM was addressable, move that flag over
to the local copy, as its address will be taken,
@@ -3625,6 +3625,9 @@ gimplify_parameters (void)
as we'll query that flag during gimplification. */
if (TREE_ADDRESSABLE (parm))
TREE_ADDRESSABLE (local) = 1;
+ else if (TREE_CODE (type) == COMPLEX_TYPE
+ || TREE_CODE (type) == VECTOR_TYPE)
+ DECL_GIMPLE_REG_P (local) = 1;
}
else
{