diff options
author | Hans Boehm <boehm@acm.org> | 2000-03-13 21:36:09 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2000-03-13 13:36:09 -0800 |
commit | 46089b8642e5054073af90a85cfdd07f0f09353b (patch) | |
tree | 1fc142b59fd56d10c4265adda2561d87c049ec77 /gcc | |
parent | f0c988c8238ee6c46c86200cda553592c97a6679 (diff) | |
download | gcc-46089b8642e5054073af90a85cfdd07f0f09353b.zip gcc-46089b8642e5054073af90a85cfdd07f0f09353b.tar.gz gcc-46089b8642e5054073af90a85cfdd07f0f09353b.tar.bz2 |
typeck.c (build_prim_array_type): Correctly set the high word too.
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/typeck.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 305fae8..2cfbf32 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -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 diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index 4a46d42..8ebb447 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -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)); } |