diff --git a/src/hotspot/share/runtime/frame.cpp b/src/hotspot/share/runtime/frame.cpp index 3687b06ae9f7f..b80aa8c4457f6 100644 --- a/src/hotspot/share/runtime/frame.cpp +++ b/src/hotspot/share/runtime/frame.cpp @@ -1163,7 +1163,7 @@ void frame::oops_do_internal(OopClosure* f, NMethodClosure* cf, #ifndef PRODUCT // simulate GC crash here to dump java thread in error report if (CrashGCForDumpingJavaThread) { - volatile char *t = nullptr; // Use volatile modifier to make clang avoid 'dead code' elimination + volatile char *t = nullptr; // Use volatile to prevent compiler from optimising away the store *t = 'c'; } #endif