Commit 98ae7998 by Eric Botcazou Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): When trying to promote the alignment...

	* 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
parent 03659b50
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
the padded type has a variable size.
......@@ -700,12 +700,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
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
}
......
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