typeck.c (build_prim_array_type): Correctly set the high word too.
authorHans Boehm <boehm@acm.org>
Mon, 13 Mar 2000 21:36:09 +0000 (21:36 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Mon, 13 Mar 2000 21:36:09 +0000 (13:36 -0800)
Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>

* typeck.c (build_prim_array_type): Correctly set the high word too.

From-SVN: r32512

gcc/java/ChangeLog
gcc/java/typeck.c

index 305fae8da692bd74db858c73682911180d6c0321..2cfbf3271c94d2ea554806eaba9ab1abc257a122 100644 (file)
@@ -1,3 +1,7 @@
+Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>
+
+       * typeck.c (build_prim_array_type): Correctly set the high word too.
+
 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
        * parse.y (qualify_ambiguous_name): Properly handle expressions
index 4a46d42c636b4834de3db0e497a7db3c8d8cd3b4..8ebb4472ab0de67f4f3292f840c1de04f5b5ac84 100644 (file)
@@ -360,7 +360,7 @@ build_prim_array_type (element_type, length)
      tree element_type;
      HOST_WIDE_INT length;
 {
-  tree max_index = build_int_2 (length - 1, 0);
+  tree max_index = build_int_2 (length - 1, (0 == length ? -1 : 0));
   TREE_TYPE (max_index) = sizetype;
   return build_array_type (element_type, build_index_type (max_index));
 }