diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index 773ecebe68d69..3749ca0776cf5 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -1988,6 +1988,10 @@ new_dereference (tree ptr, tree datum = fold_build1 (INDIRECT_REF, type, ptr); if (loc) set_tree_location (datum, loc); + if (TYPE_VOLATILE (type)) { + TREE_THIS_VOLATILE (datum) = 1; + TREE_SIDE_EFFECTS (datum) = 1; + } return datum; }