http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-11-07 22:07:00 UTC --- > Please note that before your patch, emit_block_move was never called. Indeed, I missed that. > Following patch fixes testcase for me: > > --cut here-- > Index: expr.c > =================================================================== > --- expr.c (revision 193296) > +++ expr.c (working copy) > @@ -5246,19 +5246,12 @@ store_expr (tree exp, rtx target, int call_param_p > { > if (GET_MODE (target) == BLKmode) > { > - if (REG_P (temp)) > - { > - if (TREE_CODE (exp) == CALL_EXPR) > - copy_blkmode_from_reg (target, temp, TREE_TYPE (exp)); > - else > - store_bit_field (target, > - INTVAL (expr_size (exp)) * BITS_PER_UNIT, > - 0, 0, 0, GET_MODE (temp), temp); > - } > + if (REG_P (temp) && TREE_CODE (exp) == CALL_EXPR) > + copy_blkmode_from_reg (target, temp, TREE_TYPE (exp)); > else > - emit_block_move (target, temp, expr_size (exp), > - (call_param_p > - ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL)); > + store_bit_field (target, > + INTVAL (expr_size (exp)) * BITS_PER_UNIT, > + 0, 0, 0, GET_MODE (temp), temp); > } > else > convert_move (target, temp, TYPE_UNSIGNED (TREE_TYPE (exp))); This looks fine, although this is papering over the real problem: (gdb) p debug_tree(field) <field_decl 0x7ffff6dfe390 V4SF type <vector_type 0x7ffff6df75e8 type <real_type 0x7ffff6d1de70 float SF size <integer_cst 0x7ffff6d09d40 constant 32> unit size <integer_cst 0x7ffff6d09d60 constant 4> align 32 symtab 0 alias set -1 canonical type 0x7ffff6d1de70 precision 32 pointer_to_this <pointer_type 0x7ffff6d250a8>> sizes-gimplified V4SF size <integer_cst 0x7ffff6d212a0 constant 128> unit size <integer_cst 0x7ffff6d212c0 constant 16> align 128 symtab 0 alias set -1 canonical type 0x7ffff6df75e8 nunits 4> BLK file pr44948-2a.c line 12 col 9 size <integer_cst 0x7ffff6d212a0 128> unit size <integer_cst 0x7ffff6d212c0 16> align 128 offset_align 128 offset <integer_cst 0x7ffff6d09d80 type <integer_type 0x7ffff6d1d000 sizetype> constant 0> bit offset <integer_cst 0x7ffff6d09e00 type <integer_type 0x7ffff6d1d0a8 bitsizetype> constant 0> context <record_type 0x7ffff6e342a0 A>> (gdb) p field->decl_common.mode $20 = BLKmode (gdb) p field->typed.type->type_common.mode $21 = V4SFmode The field has BLKmode as DECL_MODE but V4SFmode as TYPE_MODE (TREE_TYPE) so a VIEW_CONVERT_EXPR is missing somewhere if we need to support this nonsense...