aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-04-28 21:15:41 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-04-28 21:15:41 +0000
commit805100b5e252563c8de8bb8ce17e5b3461d5b15f (patch)
tree1d61a3e50c1e0447636ed6c5a0f4d9194c67960e /gcc/ada/decl.c
parent99c2eec1bbe6aff8915f55c41a474a4b18018731 (diff)
downloadgcc-805100b5e252563c8de8bb8ce17e5b3461d5b15f.zip
gcc-805100b5e252563c8de8bb8ce17e5b3461d5b15f.tar.gz
gcc-805100b5e252563c8de8bb8ce17e5b3461d5b15f.tar.bz2
re PR ada/36007 (verify_gimple failed)
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
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index e60b443..991faae 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)