Skip to content

Commit 5de134e

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 eee13e9 commit 5de134e

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
@@ -1981,6 +1981,10 @@ new_dereference (tree ptr,
19811981
tree datum = fold_build1 (INDIRECT_REF, type, ptr);
19821982
if (loc)
19831983
set_tree_location (datum, loc);
1984+
if (TYPE_VOLATILE (type)) {
1985+
TREE_THIS_VOLATILE (datum) = 1;
1986+
TREE_SIDE_EFFECTS (datum) = 1;
1987+
}
19841988
return datum;
19851989
}
19861990

0 commit comments

Comments
 (0)