Commit e8621b3c by Richard Kenner

(get_inner_reference): When finding mode to access bitfield that ends up properly aligned...

(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
parent f5b65a56
...@@ -4150,7 +4150,12 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode, ...@@ -4150,7 +4150,12 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
access in case EXP is in memory. */ access in case EXP is in memory. */
if (mode == VOIDmode && *pbitsize != 0 && *pbitpos % *pbitsize == 0) 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) if (mode == BLKmode)
mode = VOIDmode; mode = VOIDmode;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment