Skip to content

Commit

Permalink
Add needs-asm-support to more tests
Browse files Browse the repository at this point in the history
These were found as test failures on s390x for RHEL and Fedora.
  • Loading branch information
cuviper committed Aug 18, 2021
1 parent adf1688 commit 35fd99c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/test/codegen/naked-noinline.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Checks that naked functions are never inlined.
// compile-flags: -O -Zmir-opt-level=3
// needs-asm-support
// ignore-wasm32
#![crate_type = "lib"]
#![feature(asm)]
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/feature-gates/feature-gate-global_asm.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// needs-asm-support

global_asm!(""); //~ ERROR `global_asm!` is not stable

fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/feature-gates/feature-gate-global_asm.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: use of unstable library feature 'global_asm': `global_asm!` is not stable enough for use and is subject to change
--> $DIR/feature-gate-global_asm.rs:1:1
--> $DIR/feature-gate-global_asm.rs:3:1
|
LL | global_asm!("");
| ^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/macros/macro-expanded-include/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-emscripten no llvm_asm! support
// needs-asm-support
// build-pass (FIXME(62277): could be check-pass?)
#![feature(asm)]
#![allow(unused)]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/unsafe/inline_asm.mir.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
--> $DIR/inline_asm.rs:9:5
--> $DIR/inline_asm.rs:10:5
|
LL | asm!("nop");
| ^^^^^^^^^^^^ use of inline assembly
|
= note: inline assembly is entirely unchecked and can cause undefined behavior

error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
--> $DIR/inline_asm.rs:10:5
--> $DIR/inline_asm.rs:11:5
|
LL | llvm_asm!("nop");
| ^^^^^^^^^^^^^^^^^ use of inline assembly
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/unsafe/inline_asm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
// needs-asm-support

#![feature(llvm_asm)]
#![feature(asm)]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/unsafe/inline_asm.thir.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
--> $DIR/inline_asm.rs:9:5
--> $DIR/inline_asm.rs:10:5
|
LL | asm!("nop");
| ^^^^^^^^^^^^ use of inline assembly
|
= note: inline assembly is entirely unchecked and can cause undefined behavior

error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
--> $DIR/inline_asm.rs:10:5
--> $DIR/inline_asm.rs:11:5
|
LL | llvm_asm!("nop");
| ^^^^^^^^^^^^^^^^^ use of inline assembly
Expand Down

0 comments on commit 35fd99c

Please sign in to comment.