decl.c (complete_array_type): Don't gratuitously copy maxindex.
authorNathan Sidwell <nathan@codesourcery.com>
Wed, 4 Aug 2004 15:59:37 +0000 (15:59 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 4 Aug 2004 15:59:37 +0000 (15:59 +0000)
* decl.c (complete_array_type): Don't gratuitously copy
maxindex. Its type is always set.

From-SVN: r85562

gcc/cp/ChangeLog
gcc/cp/decl.c

index 81ac439..2057761 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * decl.c (complete_array_type): Don't gratuitously copy
+       maxindex. Its type is always set.
+
 2004-08-04  Paul Brook  <paul@codesourcery.com>
 
        * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
index 0f48997..10e0766 100644 (file)
@@ -5272,7 +5272,6 @@ complete_array_type (tree type, tree initial_value, int do_default)
              else
                maxindex = size_binop (PLUS_EXPR, maxindex, ssize_int (1));
            }
-         maxindex = copy_node (maxindex);
        }
       else
        {
@@ -5303,8 +5302,6 @@ complete_array_type (tree type, tree initial_value, int do_default)
       domain = build_index_type (maxindex);
       TYPE_DOMAIN (type) = domain;
 
-      if (! TREE_TYPE (maxindex))
-       TREE_TYPE (maxindex) = domain;
       if (initial_value)
         itype = TREE_TYPE (initial_value);
       else