When gigi builds an indexed component reference with a variable index, it marks 
the array object as addressable.  This was probably necessary back in the RTL 
days but this is very likely obsolete by now.

Tested on i586-suse-linux, applied on the mainline.


2011-07-24  Eric Botcazou  <ebotca...@adacore.com>

        * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
        left operand as addressable.


-- 
Eric Botcazou
Index: gcc-interface/utils2.c
===================================================================
--- gcc-interface/utils2.c	(revision 176712)
+++ gcc-interface/utils2.c	(working copy)
@@ -721,11 +721,6 @@ build_binary_op (enum tree_code op_code,
 	 unneeded sign conversions when sizetype is wider than integer.  */
       right_operand = convert (right_base_type, right_operand);
       right_operand = convert (sizetype, right_operand);
-
-      if (!TREE_CONSTANT (right_operand)
-	  || !TREE_CONSTANT (TYPE_MIN_VALUE (right_type)))
-	gnat_mark_addressable (left_operand);
-
       modulus = NULL_TREE;
       break;
 

Reply via email to