[PATCH] Fix Ada bootstrap (PR ada/38450)

Jakub Jelinek jakub@redhat.com
Tue Dec 9 09:12:00 GMT 2008


Hi!

Richard's patch from last night broke Ada bootstrap (supposedly because
the extra gcc-interface subdirectory where grep TYPE_MODE.*= {,*/}*.[ch]
doesn't show it), the following made through compilation of ada FE objects
during bootstrap.  Will commit as obvious when bootstrap finishes.

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.

--- gcc/ada/gcc-interface/utils.c.jj	2008-11-20 22:24:03.000000000 +0100
+++ gcc/ada/gcc-interface/utils.c	2008-12-09 09:40:17.000000000 +0100
@@ -839,7 +839,7 @@ finish_record_type (tree record_type, tr
   if (rep_level > 0)
     {
       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)
 	TYPE_SIZE_UNIT (record_type) = size_zero_node;
--- gcc/ada/gcc-interface/decl.c.jj	2008-11-28 22:19:04.000000000 +0100
+++ gcc/ada/gcc-interface/decl.c	2008-12-09 09:39:52.000000000 +0100
@@ -2032,7 +2032,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 	   corresponding fat pointer.  */
 	TREE_TYPE (gnu_type) = TYPE_POINTER_TO (gnu_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);
 	SET_TYPE_UNCONSTRAINED_ARRAY (gnu_fat_type, gnu_type);
 
@@ -2873,7 +2873,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 	   that these objects will always be placed in memory.  Do the
 	   same thing for limited record types.  */
 	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
 	   the same as that of the type we are derived from.  We assume here
@@ -5572,7 +5572,7 @@ make_aligning_type (tree type, unsigned 
     = size_binop (PLUS_EXPR, size,
 		  size_int (room + align / BITS_PER_UNIT));
 
-  TYPE_MODE (record_type) = BLKmode;
+  SET_TYPE_MODE (record_type, BLKmode);
 
   copy_alias_set (record_type, type);
   return record_type;

	Jakub



More information about the Gcc-patches mailing list