diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -6552,16 +6552,18 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize, { tree field = TREE_OPERAND (exp, 1); size_tree = DECL_SIZE (field); - if (!DECL_BIT_FIELD (field)) - mode = DECL_MODE (field); - else if (DECL_MODE (field) == BLKmode) - blkmode_bitfield = true; - else if (TREE_THIS_VOLATILE (exp) - && flag_strict_volatile_bitfields > 0) + if (flag_strict_volatile_bitfields > 0 + && TREE_THIS_VOLATILE (exp) + && DECL_BIT_FIELD_TYPE (field) + && DECL_MODE (field) != BLKmode) /* Volatile bitfields should be accessed in the mode of the field's type, not the mode computed based on the bit size. */ mode = TYPE_MODE (DECL_BIT_FIELD_TYPE (field)); + else if (!DECL_BIT_FIELD (field)) + mode = DECL_MODE (field); + else if (DECL_MODE (field) == BLKmode) + blkmode_bitfield = true; *punsignedp = DECL_UNSIGNED (field); } |