OSDN Git Service

* gcc-interface/gigi.h (maybe_variable): Delete.
[pf3gnuchains/gcc-fork.git] / gcc / ada / gcc-interface / decl.c
index 5743dc2..f048f18 100644 (file)
@@ -5822,29 +5822,6 @@ prepend_attributes (Entity_Id gnat_entity, struct attrib ** attr_list)
       }
 }
 \f
-/* Called when we need to protect a variable object using a SAVE_EXPR.  */
-
-tree
-maybe_variable (tree gnu_operand)
-{
-  if (TREE_CONSTANT (gnu_operand)
-      || TREE_READONLY (gnu_operand)
-      || TREE_CODE (gnu_operand) == SAVE_EXPR
-      || TREE_CODE (gnu_operand) == NULL_EXPR)
-    return gnu_operand;
-
-  if (TREE_CODE (gnu_operand) == UNCONSTRAINED_ARRAY_REF)
-    {
-      tree gnu_result
-       = build1 (UNCONSTRAINED_ARRAY_REF, TREE_TYPE (gnu_operand),
-                 variable_size (TREE_OPERAND (gnu_operand, 0)));
-      TREE_READONLY (gnu_result) = TYPE_READONLY (TREE_TYPE (gnu_operand));
-      return gnu_result;
-    }
-
-  return variable_size (gnu_operand);
-}
-\f
 /* Given a GNAT tree GNAT_EXPR, for an expression which is a value within a
    type definition (either a bound or a discriminant value) for GNAT_ENTITY,
    return the GCC tree to use for that expression.  GNU_NAME is the suffix
@@ -5949,23 +5926,6 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name,
 
   return expr_variable ? gnat_save_expr (gnu_expr) : gnu_expr;
 }
-
-/* Similar, but take an alignment factor and make it explicit in the tree.  */
-
-static tree
-elaborate_expression_2 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name,
-                       bool definition, bool need_debug, unsigned int align)
-{
-  tree unit_align = size_int (align / BITS_PER_UNIT);
-  return
-    size_binop (MULT_EXPR,
-               elaborate_expression_1 (size_binop (EXACT_DIV_EXPR,
-                                                   gnu_expr,
-                                                   unit_align),
-                                       gnat_entity, gnu_name, definition,
-                                       need_debug),
-               unit_align);
-}
 \f
 /* Create a record type that contains a SIZE bytes long field of TYPE with a
    starting bit position so that it is aligned to ALIGN bits, and leaving at