Skip to content

Commit 50d1270

Browse files
YakoYakoYokuYokuantoyo
authored andcommitted
jit: Fix volatile loads and stores
Related to PR d/110516 but for libgccjit. 2024-01-03 Martin Rodriguez Reboredo <[email protected]> gcc/jit/ * jit-playback.cc: Append TREE_THIS_VOLATILE and TREE_SIDE_EFFECTS to a dereference if underlying type is volatile. Signed-off-by: Martin Rodriguez Reboredo <[email protected]>
1 parent 85e56c5 commit 50d1270

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gcc/jit/jit-playback.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,10 @@ new_dereference (tree ptr,
19881988
tree datum = fold_build1 (INDIRECT_REF, type, ptr);
19891989
if (loc)
19901990
set_tree_location (datum, loc);
1991+
if (TYPE_VOLATILE (type)) {
1992+
TREE_THIS_VOLATILE (datum) = 1;
1993+
TREE_SIDE_EFFECTS (datum) = 1;
1994+
}
19911995
return datum;
19921996
}
19931997

0 commit comments

Comments
 (0)