PR ada/36007
* decl.c (gnat_to_gnu_entity) <object>: Do not promote alignment
of aliased objects with an unconstrained nominal subtype.
Cap the promotion to the effective alignment of the word mode.
Co-Authored-By: Tristan Gingold <gingold@adacore.com>
From-SVN: r134766
+2008-04-28 Eric Botcazou <ebotcazou@adacore.com>
+ Tristan Gingold <gingold@adacore.com>
+
+ PR ada/36007
+ * decl.c (gnat_to_gnu_entity) <object>: Do not promote alignment
+ of aliased objects with an unconstrained nominal subtype.
+ Cap the promotion to the effective alignment of the word mode.
+
2008-04-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Make-lang.in (ada.tags, check-acats, ada/treeprs.ads)
&& kind != E_Exception
&& kind != E_Out_Parameter
&& Is_Composite_Type (Etype (gnat_entity))
+ && !Is_Constr_Subt_For_UN_Aliased (Etype (gnat_entity))
&& !imported_p
&& No (Renamed_Object (gnat_entity))
&& No (Address_Clause (gnat_entity))))
to support BIGGEST_ALIGNMENT if we don't really have to. */
unsigned int align_cap = Is_Atomic (gnat_entity)
? BIGGEST_ALIGNMENT
- : MAX_FIXED_MODE_SIZE;
+ : get_mode_alignment (word_mode);
if (!host_integerp (TYPE_SIZE (gnu_type), 1)
|| compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0)