From: Eric Botcazou Date: Mon, 28 Apr 2008 21:15:41 +0000 (+0000) Subject: re PR ada/36007 (verify_gimple failed) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=805100b5e252563c8de8bb8ce17e5b3461d5b15f;p=gcc.git re PR ada/36007 (verify_gimple failed) PR ada/36007 * decl.c (gnat_to_gnu_entity) : 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 From-SVN: r134766 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 979ce9014bd..b8ac510d6b5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2008-04-28 Eric Botcazou + Tristan Gingold + + PR ada/36007 + * decl.c (gnat_to_gnu_entity) : 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 * Make-lang.in (ada.tags, check-acats, ada/treeprs.ads) diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index e60b4434843..991faae49e1 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -685,6 +685,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) && 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)))) @@ -694,7 +695,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) 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)