Skip to content

Commit 9265e0c

Browse files
committed
Add compiler fences to test
1 parent 625fa74 commit 9265e0c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/run-pass/atomic.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::sync::atomic::{fence, AtomicBool, AtomicIsize, AtomicU64, Ordering::*};
1+
use std::sync::atomic::{compiler_fence, fence, AtomicBool, AtomicIsize, AtomicU64, Ordering::*};
22

33
fn main() {
44
atomic_bool();
@@ -70,4 +70,8 @@ fn atomic_fences() {
7070
fence(Release);
7171
fence(Acquire);
7272
fence(AcqRel);
73+
compiler_fence(SeqCst);
74+
compiler_fence(Release);
75+
compiler_fence(Acquire);
76+
compiler_fence(AcqRel);
7377
}

0 commit comments

Comments
 (0)