diff -r adec398d9051 -r 24b5f2e635f6 src/hotspot/share/c1/c1_Instruction.hpp --- a/src/hotspot/share/c1/c1_Instruction.hpp Mon May 21 21:27:12 2018 -0700 +++ b/src/hotspot/share/c1/c1_Instruction.hpp Tue May 22 09:04:15 2018 +0200 @@ -2122,11 +2122,11 @@ // creation TableSwitch(Value tag, BlockList* sux, int lo_key, ValueStack* state_before, bool is_safepoint) : Switch(tag, sux, state_before, is_safepoint) - , _lo_key(lo_key) {} + , _lo_key(lo_key) { assert(_lo_key <= hi_key(), "integer overflow"); } // accessors int lo_key() const { return _lo_key; } - int hi_key() const { return _lo_key + length() - 1; } + int hi_key() const { return _lo_key + (length() - 1); } };