summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-09-09 21:17:30 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-09-09 21:17:30 +0200
commitfd0a8853d0d210a1a1d82e61674510cbc09db7d5 (patch)
tree2d37799c8d7e13a7ab889b576f902997d09467de /gcc/function.c
parent0f7a47dd9f584cb16078a85e75f0f680538ec07a (diff)
downloadgcc-fd0a8853d0d210a1a1d82e61674510cbc09db7d5.tar.gz
re PR rtl-optimization/37408 (Invalid insn scheduling)
PR rtl-optimization/37408 * function.c (assign_parm_find_stack_rtl): Set correct MEM_SIZE if parm is promoted. From-SVN: r140166
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 8f614b69ed6..7cff9002014 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2332,6 +2332,11 @@ assign_parm_find_stack_rtl (tree parm, struct assign_parm_data_one *data)
stack_parm = gen_rtx_MEM (data->promoted_mode, stack_parm);
set_mem_attributes (stack_parm, parm, 1);
+ /* set_mem_attributes could set MEM_SIZE to the passed mode's size,
+ while promoted mode's size is needed. */
+ if (data->promoted_mode != BLKmode
+ && data->promoted_mode != DECL_MODE (parm))
+ set_mem_size (stack_parm, GEN_INT (GET_MODE_SIZE (data->promoted_mode)));
boundary = data->locate.boundary;
align = BITS_PER_UNIT;