--- old/src/hotspot/share/gc/z/zBarrier.inline.hpp 2018-03-15 15:03:09.688754226 +0100 +++ new/src/hotspot/share/gc/z/zBarrier.inline.hpp 2018-03-15 15:03:09.515746788 +0100 @@ -141,7 +141,10 @@ // would see the unblocked state and pass this invalid oop through the // normal barrier path, which would incorrectly try to mark this oop. if (p != NULL) { - *o = *p; + // First assign to reloaded_o to avoid compiler warning about + // implicit dereference of volatile oop. + const oop reloaded_o = *p; + *o = reloaded_o; } return is_blocked;