diff --git a/src/hotspot/share/oops/compressedKlass.cpp b/src/hotspot/share/oops/compressedKlass.cpp index ba77f412289bf..e1043795bdd92 100644 --- a/src/hotspot/share/oops/compressedKlass.cpp +++ b/src/hotspot/share/oops/compressedKlass.cpp @@ -96,7 +96,7 @@ void CompressedKlassPointers::sanity_check_after_initialization() { // Check that Klass range is fully engulfed in the encoding range const address encoding_start = _base; - const address encoding_end = (address)((intptr_t)_base + (intptr_t)nth_bit(narrow_klass_pointer_bits() + _shift)); + const address encoding_end = (address)((uintptr_t)_base + (uintptr_t)nth_bit(narrow_klass_pointer_bits() + _shift)); ASSERT_HERE_2(_klass_range_start >= _base && _klass_range_end <= encoding_end, "Resulting encoding range does not fully cover the class range");