aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-decl.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c5b523..2b3370f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-29 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c-decl.c (complete_array_type): Don't gratuitously copy
+ maxindex. Check it always has a type.
+
2004-07-29 Steven Bosscher <stevenb@suse.de>
* rtl.c (currently_expanding_to_rtl): New.
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 3239817..b14d331 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3250,7 +3250,6 @@ complete_array_type (tree type, tree initial_value, int do_default)
maxindex = fold (build (PLUS_EXPR, integer_type_node,
maxindex, integer_one_node));
}
- maxindex = copy_node (maxindex);
}
else
{
@@ -3274,7 +3273,7 @@ complete_array_type (tree type, tree initial_value, int do_default)
{
TYPE_DOMAIN (type) = build_index_type (maxindex);
if (!TREE_TYPE (maxindex))
- TREE_TYPE (maxindex) = TYPE_DOMAIN (type);
+ abort ();
}
/* Lay out the type now that we can get the real answer. */