- {
- do_type_align (type, decl);
-
- /* If the field is of variable size, we can't misalign it since we
- have no way to make a temporary to align the result. But this
- isn't an issue if the decl is not addressable. Likewise if it
- is of unknown size.
-
- Note that do_type_align may set DECL_USER_ALIGN, so we don't
- want to check it again here. */
- if (DECL_PACKED (decl)
- && (DECL_NONADDRESSABLE_P (decl)
- || DECL_SIZE_UNIT (decl) == 0
- || TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST))
- DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), BITS_PER_UNIT);
- }
+ do_type_align (type, decl);
+
+ /* If the field is of variable size, we can't misalign it since we
+ have no way to make a temporary to align the result. But this
+ isn't an issue if the decl is not addressable. Likewise if it
+ is of unknown size.
+
+ Note that do_type_align may set DECL_USER_ALIGN, so we need to
+ check old_user_align instead. */
+ if (DECL_PACKED (decl)
+ && !old_user_align
+ && (DECL_NONADDRESSABLE_P (decl)
+ || DECL_SIZE_UNIT (decl) == 0
+ || TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST))
+ DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), BITS_PER_UNIT);