Commit 805100b5 by Eric Botcazou Committed by Eric Botcazou

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
parent 99c2eec1
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> 2008-04-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Make-lang.in (ada.tags, check-acats, ada/treeprs.ads) * Make-lang.in (ada.tags, check-acats, ada/treeprs.ads)
...@@ -685,6 +685,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -685,6 +685,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& kind != E_Exception && kind != E_Exception
&& kind != E_Out_Parameter && kind != E_Out_Parameter
&& Is_Composite_Type (Etype (gnat_entity)) && Is_Composite_Type (Etype (gnat_entity))
&& !Is_Constr_Subt_For_UN_Aliased (Etype (gnat_entity))
&& !imported_p && !imported_p
&& No (Renamed_Object (gnat_entity)) && No (Renamed_Object (gnat_entity))
&& No (Address_Clause (gnat_entity)))) && No (Address_Clause (gnat_entity))))
...@@ -694,7 +695,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -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. */ to support BIGGEST_ALIGNMENT if we don't really have to. */
unsigned int align_cap = Is_Atomic (gnat_entity) unsigned int align_cap = Is_Atomic (gnat_entity)
? BIGGEST_ALIGNMENT ? BIGGEST_ALIGNMENT
: MAX_FIXED_MODE_SIZE; : get_mode_alignment (word_mode);
if (!host_integerp (TYPE_SIZE (gnu_type), 1) if (!host_integerp (TYPE_SIZE (gnu_type), 1)
|| compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0) || compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0)
......
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