Commit 6f9f0ce3 by Jakub Jelinek Committed by Jakub Jelinek

re PR ada/38450 (ada bootstrap is broken)

	PR ada/38450
	* gcc-interface/utils.c (finish_record_type): Use SET_TYPE_MODE.
	* gcc-interface/decl.c (gnat_to_gnu_entity, make_aligning_type):
	Likewise.

From-SVN: r142588
parent 45769134
2008-12-09 Jakub Jelinek <jakub@redhat.com>
PR ada/38450
* gcc-interface/utils.c (finish_record_type): Use SET_TYPE_MODE.
* gcc-interface/decl.c (gnat_to_gnu_entity, make_aligning_type):
Likewise.
2008-12-05 Sebastian Pop <sebastian.pop@amd.com> 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
PR bootstrap/38262 PR bootstrap/38262
...@@ -2032,7 +2032,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -2032,7 +2032,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
corresponding fat pointer. */ corresponding fat pointer. */
TREE_TYPE (gnu_type) = TYPE_POINTER_TO (gnu_type) TREE_TYPE (gnu_type) = TYPE_POINTER_TO (gnu_type)
= TYPE_REFERENCE_TO (gnu_type) = gnu_fat_type; = TYPE_REFERENCE_TO (gnu_type) = gnu_fat_type;
TYPE_MODE (gnu_type) = BLKmode; SET_TYPE_MODE (gnu_type, BLKmode);
TYPE_ALIGN (gnu_type) = TYPE_ALIGN (tem); TYPE_ALIGN (gnu_type) = TYPE_ALIGN (tem);
SET_TYPE_UNCONSTRAINED_ARRAY (gnu_fat_type, gnu_type); SET_TYPE_UNCONSTRAINED_ARRAY (gnu_fat_type, gnu_type);
...@@ -2873,7 +2873,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -2873,7 +2873,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
that these objects will always be placed in memory. Do the that these objects will always be placed in memory. Do the
same thing for limited record types. */ same thing for limited record types. */
if (Is_Tagged_Type (gnat_entity) || Is_Limited_Record (gnat_entity)) if (Is_Tagged_Type (gnat_entity) || Is_Limited_Record (gnat_entity))
TYPE_MODE (gnu_type) = BLKmode; SET_TYPE_MODE (gnu_type, BLKmode);
/* If this is a derived type, we must make the alias set of this type /* If this is a derived type, we must make the alias set of this type
the same as that of the type we are derived from. We assume here the same as that of the type we are derived from. We assume here
...@@ -5572,7 +5572,7 @@ make_aligning_type (tree type, unsigned int align, tree size, ...@@ -5572,7 +5572,7 @@ make_aligning_type (tree type, unsigned int align, tree size,
= size_binop (PLUS_EXPR, size, = size_binop (PLUS_EXPR, size,
size_int (room + align / BITS_PER_UNIT)); size_int (room + align / BITS_PER_UNIT));
TYPE_MODE (record_type) = BLKmode; SET_TYPE_MODE (record_type, BLKmode);
copy_alias_set (record_type, type); copy_alias_set (record_type, type);
return record_type; return record_type;
...@@ -5721,8 +5721,8 @@ make_packable_type (tree type, bool in_record) ...@@ -5721,8 +5721,8 @@ make_packable_type (tree type, bool in_record)
/* Try harder to get a packable type if necessary, for example /* Try harder to get a packable type if necessary, for example
in case the record itself contains a BLKmode field. */ in case the record itself contains a BLKmode field. */
if (in_record && TYPE_MODE (new_type) == BLKmode) if (in_record && TYPE_MODE (new_type) == BLKmode)
TYPE_MODE (new_type) SET_TYPE_MODE (new_type,
= mode_for_size_tree (TYPE_SIZE (new_type), MODE_INT, 1); mode_for_size_tree (TYPE_SIZE (new_type), MODE_INT, 1));
/* If neither the mode nor the size has shrunk, return the old type. */ /* If neither the mode nor the size has shrunk, return the old type. */
if (TYPE_MODE (new_type) == BLKmode && new_size >= size) if (TYPE_MODE (new_type) == BLKmode && new_size >= size)
......
...@@ -839,7 +839,7 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, ...@@ -839,7 +839,7 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level,
if (rep_level > 0) if (rep_level > 0)
{ {
TYPE_ALIGN (record_type) = MAX (BITS_PER_UNIT, TYPE_ALIGN (record_type)); TYPE_ALIGN (record_type) = MAX (BITS_PER_UNIT, TYPE_ALIGN (record_type));
TYPE_MODE (record_type) = BLKmode; SET_TYPE_MODE (record_type, BLKmode);
if (!had_size_unit) if (!had_size_unit)
TYPE_SIZE_UNIT (record_type) = size_zero_node; TYPE_SIZE_UNIT (record_type) = size_zero_node;
......
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