From: Jakub Jelinek Date: Tue, 9 Sep 2008 19:17:30 +0000 (+0200) Subject: re PR rtl-optimization/37408 (Invalid insn scheduling) X-Git-Tag: releases/gcc-4.4.0~2535 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd0a8853d0d210a1a1d82e61674510cbc09db7d5;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef34d8d541d4..8a255250c737 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-09-09 Jakub Jelinek + + PR rtl-optimization/37408 + * function.c (assign_parm_find_stack_rtl): Set correct MEM_SIZE + if parm is promoted. + 2008-09-09 Sebastian Pop PR tree-optimization/37375 diff --git a/gcc/function.c b/gcc/function.c index 8f614b69ed60..7cff90020142 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;