misc.c (gnat_expand_expr, [...]): Consistently set MEM attributes from expression...
authorRichard Kenner <kenner@gnat.com>
Mon, 8 Oct 2001 14:06:05 +0000 (14:06 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Mon, 8 Oct 2001 14:06:05 +0000 (16:06 +0200)
* misc.c (gnat_expand_expr, case UNCHECKED_CONVERT_EXPR):
Consistently set MEM attributes from expression; fixes
bootstrap failure on x86.

From-SVN: r46076

gcc/ada/ChangeLog
gcc/ada/misc.c

index 338ea66a4a45aacf287f4c82d4b4ff824c7f2471..013a8f2b1711bc632057e27781e9775f55f4d871 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-08  Richard Kenner (kenner@gnat.com)
+
+       * misc.c (gnat_expand_expr, case UNCHECKED_CONVERT_EXPR):
+       Consistently set MEM attributes from expression; fixes
+       bootstrap failure on x86.
+
 2001-10-08  Geert Bosch  (bosch@gnat.com)
 
        * 5oosinte.adb: Add 2001 to copyright notice.
index a806d241ea8b6826144c6725527e5381197fd0fc..dbfe9e39b3410da8e9dcd731ad944f596ad33cc0 100644 (file)
@@ -573,26 +573,11 @@ gnat_expand_expr (exp, target, tmode, modifier)
       else if ((TYPE_MODE (type) == BLKmode
                || TYPE_MODE (inner_type) == BLKmode)
               && align_ok)
-       {
-         new = build_unary_op (INDIRECT_REF, NULL_TREE,
-                               convert
-                               (build_pointer_type (type),
-                                build_unary_op (ADDR_EXPR, NULL_TREE,
-                                                TREE_OPERAND (exp, 0))));
-         result = expand_expr (new, target, tmode, modifier);
-
-         if (GET_CODE (result) != MEM)
-           gigi_abort (204);
-
-         /* Since this is really the underlying object, set the flags from
-            the underlying type.
-
-            ??? Note that this is very dubious because it may change the
-            attributes for a temporary location, which is not allowed.  */
-         set_mem_alias_set (result, 0);
-         set_mem_attributes (result, TREE_OPERAND (exp, 0), 0);
-         return result;
-       }
+       new = build_unary_op (INDIRECT_REF, NULL_TREE,
+                             convert
+                             (build_pointer_type (type),
+                              build_unary_op (ADDR_EXPR, NULL_TREE,
+                                              TREE_OPERAND (exp, 0))));
 
       /* Otherwise make a union of the two types, convert to the union, and
         extract the other value.  */