> > Index: expr.c > > =================================================================== > > --- expr.c (revision 228267) > > +++ expr.c (working copy) > > @@ -5462,7 +5462,12 @@ store_expr_with_bounds (tree exp, rtx ta > > { > > if (GET_MODE (temp) != GET_MODE (target) && GET_MODE (temp) != > > VOIDmode) { > > - if (GET_MODE (target) == BLKmode) > > + if (GET_MODE (temp) == BLKmode && GET_MODE (target) != BLKmode) > > + { > > + gcc_assert (AGGREGATE_TYPE_P (TREE_TYPE (exp))); > > + temp = simplify_gen_subreg (GET_MODE (target), temp, BLKmode, 0); > > + } > > Are you really trying to create a SUBREG with BLKmode here? I want to get MEM of non-BLKmode folded to MEM of BLKmode. I already changedit to adjust_address_nv in the patch I am re-testing. I will post once testing finished. (simplify_gen_subreg actually traps for BLKmode and correctly so)
I do not think we can get PARALLEL here and thus use of adjust_address_nv as follows seems to be right trick: if (GET_MODE (temp) == BLKmode && GET_MODE (target) != BLKmode) { gcc_assert (AGGREGATE_TYPE_P (TREE_TYPE (exp))); gcc_assert (MEM_P (temp)); temp = adjust_address_nv (temp, GET_MODE (target), 0); } Honza