OSDN Git Service

* gfortran.dg/ishft.f90: Remove kind suffix from BOZ constant
[pf3gnuchains/gcc-fork.git] / gcc / stor-layout.c
index 13fdb3c..ac7fb74 100644 (file)
@@ -125,19 +125,11 @@ variable_size (tree size)
      just return SIZE unchanged.  Likewise for self-referential sizes and
      constant sizes.  */
   if (TREE_CONSTANT (size)
-      || TREE_CODE (size) == SAVE_EXPR
       || lang_hooks.decls.global_bindings_p () < 0
       || CONTAINS_PLACEHOLDER_P (size))
     return size;
 
-  /* Force creation of a SAVE_EXPR.  This solves (1) code duplication 
-     problems between parent and nested functions that occasionally can't
-     be cleaned up because of portions of the expression escaping the
-     parent function via the FRAME object, and (2) tree sharing problems
-     between the type system and the gimple code, which can leak SSA_NAME
-     objects into e.g. TYPE_SIZE, which cause heartburn when emitting
-     debug information.  */
-  size = build1 (SAVE_EXPR, TREE_TYPE (size), size);
+  size = save_expr (size);
 
   /* If an array with a variable number of elements is declared, and
      the elements require destruction, we will emit a cleanup for the
@@ -333,8 +325,8 @@ layout_decl (tree decl, unsigned int known_align)
 
   if (DECL_SIZE (decl) == 0)
     {
-      DECL_SIZE (decl) = unshare_expr (TYPE_SIZE (type));
-      DECL_SIZE_UNIT (decl) = unshare_expr (TYPE_SIZE_UNIT (type));
+      DECL_SIZE (decl) = TYPE_SIZE (type);
+      DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
     }
   else if (DECL_SIZE_UNIT (decl) == 0)
     DECL_SIZE_UNIT (decl)
@@ -1644,8 +1636,8 @@ layout_type (tree type)
        if (index && TYPE_MAX_VALUE (index) && TYPE_MIN_VALUE (index)
            && TYPE_SIZE (element))
          {
-           tree ub = unshare_expr (TYPE_MAX_VALUE (index));
-           tree lb = unshare_expr (TYPE_MIN_VALUE (index));
+           tree ub = TYPE_MAX_VALUE (index);
+           tree lb = TYPE_MIN_VALUE (index);
            tree length;
            tree element_size;