This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Redo handling of consistency check for Optimize_Alignment
> And this should fix the breakage on RISC platforms.
It didn't. This one should...
Bootstrapped on ia64-suse-linux, applied on the mainline.
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.
--
Eric Botcazou
Index: decl.c
===================================================================
--- decl.c (revision 134722)
+++ decl.c (working copy)
@@ -685,6 +685,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
&& 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))))