summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/volatile-intrinsics
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/run-make-fulldeps/volatile-intrinsics
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/volatile-intrinsics')
-rw-r--r--tests/run-make-fulldeps/volatile-intrinsics/Makefile9
-rw-r--r--tests/run-make-fulldeps/volatile-intrinsics/main.rs24
2 files changed, 0 insertions, 33 deletions
diff --git a/tests/run-make-fulldeps/volatile-intrinsics/Makefile b/tests/run-make-fulldeps/volatile-intrinsics/Makefile
deleted file mode 100644
index 2a78c7b9c..000000000
--- a/tests/run-make-fulldeps/volatile-intrinsics/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-include ../tools.mk
-
-all:
- # The tests must pass...
- $(RUSTC) main.rs
- $(call RUN,main)
- # ... and the loads/stores must not be optimized out.
- $(RUSTC) main.rs --emit=llvm-ir
- $(CGREP) "load volatile" "store volatile" < $(TMPDIR)/main.ll
diff --git a/tests/run-make-fulldeps/volatile-intrinsics/main.rs b/tests/run-make-fulldeps/volatile-intrinsics/main.rs
deleted file mode 100644
index 4295d95f3..000000000
--- a/tests/run-make-fulldeps/volatile-intrinsics/main.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-#![feature(core_intrinsics, volatile)]
-
-use std::intrinsics::{
- unaligned_volatile_load, unaligned_volatile_store, volatile_load, volatile_store,
-};
-use std::ptr::{read_volatile, write_volatile};
-
-pub fn main() {
- unsafe {
- let mut i: isize = 1;
- volatile_store(&mut i, 2);
- assert_eq!(volatile_load(&i), 2);
- }
- unsafe {
- let mut i: isize = 1;
- unaligned_volatile_store(&mut i, 2);
- assert_eq!(unaligned_volatile_load(&i), 2);
- }
- unsafe {
- let mut i: isize = 1;
- write_volatile(&mut i, 2);
- assert_eq!(read_volatile(&i), 2);
- }
-}