Skip to content

Commit

Permalink
test: ui: skip tests which aren't appropriate for RISC-V
Browse files Browse the repository at this point in the history
  • Loading branch information
tblah committed Jun 4, 2020
1 parent 6279571 commit 8edb05c
Show file tree
Hide file tree
Showing 26 changed files with 60 additions and 42 deletions.
1 change: 1 addition & 0 deletions src/test/ui/borrowck/borrowck-asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64

Expand Down
14 changes: 7 additions & 7 deletions src/test/ui/borrowck/borrowck-asm.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0382]: use of moved value: `x`
--> $DIR/borrowck-asm.rs:24:17
--> $DIR/borrowck-asm.rs:25:17
|
LL | let x = &mut 0isize;
| - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait
Expand All @@ -11,7 +11,7 @@ LL | let z = x;
| ^ value used here after move

error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/borrowck-asm.rs:31:37
--> $DIR/borrowck-asm.rs:32:37
|
LL | let y = &mut x;
| ------ borrow of `x` occurs here
Expand All @@ -23,7 +23,7 @@ LL | let z = y;
| - borrow later used here

error[E0384]: cannot assign twice to immutable variable `x`
--> $DIR/borrowck-asm.rs:39:36
--> $DIR/borrowck-asm.rs:40:36
|
LL | let x = 3;
| -
Expand All @@ -35,7 +35,7 @@ LL | llvm_asm!("nop" : "=r"(x));
| ^ cannot assign twice to immutable variable

error[E0384]: cannot assign twice to immutable variable `x`
--> $DIR/borrowck-asm.rs:53:36
--> $DIR/borrowck-asm.rs:54:36
|
LL | let x = 3;
| -
Expand All @@ -47,13 +47,13 @@ LL | llvm_asm!("nop" : "+r"(x));
| ^ cannot assign twice to immutable variable

error[E0381]: use of possibly-uninitialized variable: `x`
--> $DIR/borrowck-asm.rs:60:37
--> $DIR/borrowck-asm.rs:61:37
|
LL | llvm_asm!("nop" : "=*r"(x));
| ^ use of possibly-uninitialized `x`

error[E0506]: cannot assign to `x` because it is borrowed
--> $DIR/borrowck-asm.rs:68:36
--> $DIR/borrowck-asm.rs:69:36
|
LL | let y = &*x;
| --- borrow of `x` occurs here
Expand All @@ -65,7 +65,7 @@ LL | let z = y;
| - borrow later used here

error[E0382]: use of moved value: `x`
--> $DIR/borrowck-asm.rs:76:45
--> $DIR/borrowck-asm.rs:77:45
|
LL | let x = &mut 2;
| - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/c-variadic/variadic-ffi-1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// ignore-arm stdcall isn't supported
// ignore-aarch64 stdcall isn't supported
// ignore-riscv64 stdcall isn't supported

extern "stdcall" {
fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling
Expand Down
22 changes: 11 additions & 11 deletions src/test/ui/c-variadic/variadic-ffi-1.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0045]: C-variadic function must have C or cdecl calling convention
--> $DIR/variadic-ffi-1.rs:5:5
--> $DIR/variadic-ffi-1.rs:6:5
|
LL | fn printf(_: *const u8, ...);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention

error[E0060]: this function takes at least 2 arguments but 0 arguments were supplied
--> $DIR/variadic-ffi-1.rs:16:9
--> $DIR/variadic-ffi-1.rs:17:9
|
LL | fn foo(f: isize, x: u8, ...);
| ----------------------------- defined here
Expand All @@ -16,7 +16,7 @@ LL | foo();
| expected at least 2 arguments

error[E0060]: this function takes at least 2 arguments but 1 argument was supplied
--> $DIR/variadic-ffi-1.rs:17:9
--> $DIR/variadic-ffi-1.rs:18:9
|
LL | fn foo(f: isize, x: u8, ...);
| ----------------------------- defined here
Expand All @@ -27,7 +27,7 @@ LL | foo(1);
| expected at least 2 arguments

error[E0308]: mismatched types
--> $DIR/variadic-ffi-1.rs:19:56
--> $DIR/variadic-ffi-1.rs:20:56
|
LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
| ------------------------------------- ^^^ expected non-variadic fn, found variadic function
Expand All @@ -38,7 +38,7 @@ LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
found fn item `unsafe extern "C" fn(_, _, ...) {foo}`

error[E0308]: mismatched types
--> $DIR/variadic-ffi-1.rs:20:54
--> $DIR/variadic-ffi-1.rs:21:54
|
LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar;
| ----------------------------------- ^^^ expected variadic fn, found non-variadic function
Expand All @@ -49,37 +49,37 @@ LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar;
found fn item `extern "C" fn(_, _) {bar}`

error[E0617]: can't pass `f32` to variadic function
--> $DIR/variadic-ffi-1.rs:22:19
--> $DIR/variadic-ffi-1.rs:23:19
|
LL | foo(1, 2, 3f32);
| ^^^^ help: cast the value to `c_double`: `3f32 as c_double`

error[E0617]: can't pass `bool` to variadic function
--> $DIR/variadic-ffi-1.rs:23:19
--> $DIR/variadic-ffi-1.rs:24:19
|
LL | foo(1, 2, true);
| ^^^^ help: cast the value to `c_int`: `true as c_int`

error[E0617]: can't pass `i8` to variadic function
--> $DIR/variadic-ffi-1.rs:24:19
--> $DIR/variadic-ffi-1.rs:25:19
|
LL | foo(1, 2, 1i8);
| ^^^ help: cast the value to `c_int`: `1i8 as c_int`

error[E0617]: can't pass `u8` to variadic function
--> $DIR/variadic-ffi-1.rs:25:19
--> $DIR/variadic-ffi-1.rs:26:19
|
LL | foo(1, 2, 1u8);
| ^^^ help: cast the value to `c_uint`: `1u8 as c_uint`

error[E0617]: can't pass `i16` to variadic function
--> $DIR/variadic-ffi-1.rs:26:19
--> $DIR/variadic-ffi-1.rs:27:19
|
LL | foo(1, 2, 1i16);
| ^^^^ help: cast the value to `c_int`: `1i16 as c_int`

error[E0617]: can't pass `u16` to variadic function
--> $DIR/variadic-ffi-1.rs:27:19
--> $DIR/variadic-ffi-1.rs:28:19
|
LL | foo(1, 2, 1u16);
| ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint`
Expand Down
3 changes: 3 additions & 0 deletions src/test/ui/cfg/conditional-compile-arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ pub fn main() { }

#[cfg(target_arch = "sparc64")]
pub fn main() { }

#[cfg(target_arch = "riscv64")]
pub fn main() { }
1 change: 1 addition & 0 deletions src/test/ui/extern/extern-methods.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-pass
// ignore-arm
// ignore-aarch64
// ignore-riscv64 fastcall isn't supported

trait A {
extern "fastcall" fn test1(i: i32);
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/extern/extern-thiscall.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-pass
// ignore-arm
// ignore-aarch64
// ignore-riscv64 thiscall isn't supported

#![feature(abi_thiscall)]

Expand Down
1 change: 1 addition & 0 deletions src/test/ui/extern/extern-vectorcall.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-pass
// ignore-arm
// ignore-aarch64
// ignore-riscv64 vectorcall isn't supported

#![feature(abi_vectorcall)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Test that the MSP430 interrupt ABI cannot be used when msp430_interrupt
// feature gate is not used.

// ignore-riscv64 msp430 is not supported

extern "msp430-interrupt" fn foo() {}
//~^ ERROR msp430-interrupt ABI is experimental and subject to change

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: msp430-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-msp430-interrupt.rs:4:8
--> $DIR/feature-gate-abi-msp430-interrupt.rs:6:8
|
LL | extern "msp430-interrupt" fn foo() {}
| ^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/llvm-asm/llvm-asm-bad-clobber.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0664]: clobber should not be surrounded by braces
--> $DIR/llvm-asm-bad-clobber.rs:22:42
--> $DIR/llvm-asm-bad-clobber.rs:23:42
|
LL | llvm_asm!("xor %eax, %eax" : : : "{eax}");
| ^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0662]: input operand constraint contains '='
--> $DIR/llvm-asm-in-bad-modifier.rs:23:44
--> $DIR/llvm-asm-in-bad-modifier.rs:24:44
|
LL | llvm_asm!("mov $1, $0" : "=r"(x) : "=r"(5));
| ^^^^

error[E0663]: input operand constraint contains '+'
--> $DIR/llvm-asm-in-bad-modifier.rs:24:44
--> $DIR/llvm-asm-in-bad-modifier.rs:25:44
|
LL | llvm_asm!("mov $1, $0" : "=r"(y) : "+r"(5));
| ^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/llvm-asm/llvm-asm-misplaced-option.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
warning: unrecognized option
--> $DIR/llvm-asm-misplaced-option.rs:24:69
--> $DIR/llvm-asm-misplaced-option.rs:25:69
|
LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
| ^^^^

warning: expected a clobber, found an option
--> $DIR/llvm-asm-misplaced-option.rs:31:85
--> $DIR/llvm-asm-misplaced-option.rs:32:85
|
LL | llvm_asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
| ^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/llvm-asm/llvm-asm-out-assign-imm.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0384]: cannot assign twice to immutable variable `x`
--> $DIR/llvm-asm-out-assign-imm.rs:24:39
--> $DIR/llvm-asm-out-assign-imm.rs:25:39
|
LL | let x: isize;
| - help: make this binding mutable: `mut x`
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/llvm-asm/llvm-asm-out-no-modifier.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0661]: output operand constraint lacks '=' or '+'
--> $DIR/llvm-asm-out-no-modifier.rs:22:34
--> $DIR/llvm-asm-out-no-modifier.rs:23:34
|
LL | llvm_asm!("mov $1, $0" : "r"(x) : "r"(5));
| ^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-mips
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/llvm-asm/llvm-asm-out-read-uninit.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0381]: use of possibly-uninitialized variable: `x`
--> $DIR/llvm-asm-out-read-uninit.rs:22:48
--> $DIR/llvm-asm-out-read-uninit.rs:23:48
|
LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x));
| ^ use of possibly-uninitialized `x`
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/target-feature/gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-sparc
// ignore-sparc64
// ignore-s390x
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/target-feature/gate.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: the target feature `avx512bw` is currently unstable
--> $DIR/gate.rs:30:18
--> $DIR/gate.rs:31:18
|
LL | #[target_feature(enable = "avx512bw")]
| ^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/target-feature/invalid-attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// ignore-powerpc
// ignore-powerpc64
// ignore-powerpc64le
// ignore-riscv64
// ignore-s390x
// ignore-sparc
// ignore-sparc64
Expand Down
Loading

0 comments on commit 8edb05c

Please sign in to comment.