diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-07-29 08:42:55 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-07-29 08:42:55 +0000 |
commit | 91683ccda0140a2c533fc82a8b0b373ac09a95fd (patch) | |
tree | 2caec6ea0fa2f6838132405de9e1ac708f0bce0b /gcc | |
parent | 4586b4cadc3bbcbc9a171ffc9124fc622858a514 (diff) | |
download | gcc-91683ccda0140a2c533fc82a8b0b373ac09a95fd.zip gcc-91683ccda0140a2c533fc82a8b0b373ac09a95fd.tar.gz gcc-91683ccda0140a2c533fc82a8b0b373ac09a95fd.tar.bz2 |
c-decl.c (complete_array_type): Don't gratuitously copy maxindex.
* c-decl.c (complete_array_type): Don't gratuitously copy
maxindex. Check it always has a type.
From-SVN: r85288
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-decl.c | 3 |
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. */ |