This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed
tests/run-make/volatile-intrinsics Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,6 @@ run-make/track-pgo-dep-info/Makefile
186186run-make/translation/Makefile
187187run-make/type-mismatch-same-crate-name/Makefile
188188run-make/unstable-flag-required/Makefile
189- run-make/volatile-intrinsics/Makefile
190189run-make/wasm-exceptions-nostd/Makefile
191190run-make/wasm-override-linker/Makefile
192191run-make/weird-output-filenames/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ //@ ignore-cross-compile
2+
3+ use run_make_support:: fs_wrapper:: read;
4+ use run_make_support:: { assert_contains, run, rustc} ;
5+
6+ fn main ( ) {
7+ // The tests must pass...
8+ rustc ( ) . input ( "main.rs" ) . run ( ) ;
9+ run ( "main" ) ;
10+
11+ // ... and the loads/stores must not be optimized out.
12+ rustc ( ) . input ( "main.rs" ) . emit ( "llvm-ir" ) . run ( ) ;
13+
14+ let raw_llvm_ir = read ( "main.ll" ) ;
15+ let llvm_ir = String :: from_utf8_lossy ( & raw_llvm_ir) ;
16+ assert_contains ( & llvm_ir, "load volatile" ) ;
17+ assert_contains ( & llvm_ir, "store volatile" ) ;
18+ }
You can’t perform that action at this time.
0 commit comments