(get_inner_reference): When finding mode to access bitfield that ends
up properly aligned, use mode class of its type unless type's mode was
BLKmode.
From-SVN: r11651
access in case EXP is in memory. */
if (mode == VOIDmode && *pbitsize != 0 && *pbitpos % *pbitsize == 0)
{
- mode = mode_for_size (*pbitsize, MODE_INT, 0);
+ mode = mode_for_size (*pbitsize,
+ (TYPE_MODE (TREE_TYPE (orig_exp)) == BLKmode
+ ? MODE_INT
+ : GET_MODE_CLASS (TYPE_MODE
+ (TREE_TYPE (orig_exp)))),
+ 0);
if (mode == BLKmode)
mode = VOIDmode;
}