* decl.c (gnat_to_gnu_entity) <object>: When trying to promote the
alignment, reset it to zero if it would end up not being greater
than that of the type.
From-SVN: r134461
+2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * decl.c (gnat_to_gnu_entity) <object>: When trying to promote the
+ alignment, reset it to zero if it would end up not being greater
+ than that of the type.
+
2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (maybe_pad_type): Only generate the XVS parallel type if
align = ceil_alignment (tree_low_cst (TYPE_SIZE (gnu_type), 1));
/* But make sure not to under-align the object. */
- if (align < TYPE_ALIGN (gnu_type))
- align = TYPE_ALIGN (gnu_type);
+ if (align <= TYPE_ALIGN (gnu_type))
+ align = 0;
/* And honor the minimum valid atomic alignment, if any. */
#ifdef MINIMUM_ATOMIC_ALIGNMENT
- if (align < MINIMUM_ATOMIC_ALIGNMENT)
+ else if (align < MINIMUM_ATOMIC_ALIGNMENT)
align = MINIMUM_ATOMIC_ALIGNMENT;
#endif
}