Skip to content

Commit cf45d77

Browse files
committed
Add test to self-check needs-target-has-atomic directive
1 parent a74764c commit cf45d77

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Check this ignored because x86_64-unknown-linux-gnu does not have 128-bit atomic operation.
2+
3+
//@ only-x86_64-unknown-linux-gnu
4+
//@ needs-target-has-atomic: 128
5+
6+
fn main() {
7+
#[cfg(not(target_has_atomic = "128"))]
8+
compile_error!("target does not have 128-bit atomic operation");
9+
}

0 commit comments

Comments
 (0)