Message ID | 5335B3B0.9010701@redhat.com |
---|---|
State | New |
Headers | show |
Index: gcc/java/boehm.c =================================================================== --- gcc/java/boehm.c (revision 208839) +++ gcc/java/boehm.c (working copy) @@ -107,7 +107,11 @@ bits for all words in the record. This is conservative, but the size_words != 1 case is impossible in regular java code. */ for (i = 0; i < size_words; ++i) - *mask = (*mask).set_bit (ubit - count - i - 1); + { + int bitpos = ubit - count - i - 1; + if (bitpos >= 0) + *mask = (*mask).set_bit (bitpos); + } if (count >= ubit - 2) *pointer_after_end = 1;