This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/51895] [4.7 Regression] ICE in simplify_subreg


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51895

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-19 10:16:07 UTC ---
(In reply to comment #3)
> >                 bftype = TREE_TYPE (base);
> >                 if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode)
> >                   bftype = TREE_TYPE (exp);
> >                 return expand_expr (build3 (BIT_FIELD_REF, bftype,
> >                                             base,
> >                                             TYPE_SIZE (TREE_TYPE (exp)),
> >                                             bit_offset),
> >                                     target, tmode, modifier);
> > base here is TImode (x PARM_DECL), but exp is BLKmode, so this returns a TImode
> > pseudo.  Shouldn't it store it into a BLKmode temporary and return that MEM
> > instead?
> 
> Using a BIT_FIELD_REF looked most convenient.  Using extract_bit_field
> may also be an option (which I suppose is what the above ends up doing?)

I think if exp is BLKmode, then we don't want to do a BIT_FIELD_REF nor
extract_bit_field.  We IMHO need to store base into a temporary and just adjust
the MEM.  Or extract the bit field and then store it into a temporary and
adjust, but the former looks easier.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]