diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-04 15:59:37 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-04 15:59:37 +0000 |
commit | fe1745b9aa0a1b5d849e7aeba157e884c1fabc67 (patch) | |
tree | 7dbc2c819ee9b79e831cad5efab7a17a6cd354db /gcc | |
parent | 853b76408afac56f049f4720e38b2853d632cc74 (diff) | |
download | gcc-fe1745b9aa0a1b5d849e7aeba157e884c1fabc67.tar.gz |
* decl.c (complete_array_type): Don't gratuitously copy
maxindex. Its type is always set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85562 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 81ac4397627..20577618fe4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0f489976a63..10e0766b3d7 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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 |