Index: runtime/vm/simulator_dbc.cc |
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc |
index a34d93badcfc3cb1d322075d0b73157e5d2c8550..9706eeeb644d59cb0638abacd3c886f84725d863 100644 |
--- a/runtime/vm/simulator_dbc.cc |
+++ b/runtime/vm/simulator_dbc.cc |
@@ -2838,7 +2838,7 @@ RawObject* Simulator::Call(const Code& code, |
{ |
BYTECODE(CreateArrayOpt, A_B_C); |
const intptr_t length = Smi::Value(RAW_CAST(Smi, FP[rB])); |
- if (LIKELY(length <= Array::kMaxElements)) { |
+ if (LIKELY(static_cast<uintptr_t>(length) <= Array::kMaxElements)) { |
const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1; |
const intptr_t instance_size = |
(fixed_size + length*kWordSize) & ~(kObjectAlignment - 1); |