[Ada] Applied misc.c fix
Geert Bosch
bosch@gnat.com
Mon Oct 8 09:04:00 GMT 2001
I applied the following patch. This does not fix the stage3 comparison
failure however, so bootstrap is still not 100% OK. Bootstrapped on
x86/GNU Linux.
-Geert
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.
diff -p -r1.2 -r1.3
*** misc.c 2001/10/02 23:33:26 1.2
--- misc.c 2001/10/08 14:06:05 1.3
*************** gnat_expand_expr (exp, target, tmode, mo
*** 573,598 ****
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;
! }
/* Otherwise make a union of the two types, convert to the union, and
extract the other value. */
--- 573,583 ----
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))));
/* Otherwise make a union of the two types, convert to the union, and
extract the other value. */
More information about the Gcc-patches
mailing list