diff -r e92153ed8bdc -r 29b0d0b61615 src/hotspot/share/gc/z/zArray.inline.hpp --- a/src/hotspot/share/gc/z/zArray.inline.hpp Mon Nov 25 12:30:24 2019 +0100 +++ b/src/hotspot/share/gc/z/zArray.inline.hpp Mon Nov 25 12:31:39 2019 +0100 @@ -101,7 +101,7 @@ template inline bool ZArrayIteratorImpl::next(T* elem) { if (parallel) { - const size_t next = Atomic::add(1u, &_next) - 1u; + const size_t next = Atomic::add(&_next, 1u) - 1u; if (next < _array->size()) { *elem = _array->at(next); return true;