From: Nathan Sidwell Date: Thu, 29 Jul 2004 08:42:55 +0000 (+0000) Subject: c-decl.c (complete_array_type): Don't gratuitously copy maxindex. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91683ccda0140a2c533fc82a8b0b373ac09a95fd;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c5b5237ad6..2b3370ff24c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-29 Nathan Sidwell + + * c-decl.c (complete_array_type): Don't gratuitously copy + maxindex. Check it always has a type. + 2004-07-29 Steven Bosscher * rtl.c (currently_expanding_to_rtl): New. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 3239817da2b..b14d331cadc 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. */