diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-06 08:42:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 08:42:20 +0000 |
commit | 0824b2ed1f4df9b85305cdc287dba7b2c87ac35f (patch) | |
tree | 0503f1a236cc5e5314f4954817914775a39f964b | |
parent | b96ab2e1a9539d1bb6a807774b9afe061de68fc4 (diff) | |
parent | 9a0a655cd0c9b734e0386ba7f0c8e9d94ffc2c2a (diff) | |
download | gcc-0824b2ed1f4df9b85305cdc287dba7b2c87ac35f.zip gcc-0824b2ed1f4df9b85305cdc287dba7b2c87ac35f.tar.gz gcc-0824b2ed1f4df9b85305cdc287dba7b2c87ac35f.tar.bz2 |
Merge #411
411: A little bit of testsuite tuning r=philberty a=tschwinge
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
24 files changed, 31 insertions, 33 deletions
diff --git a/gcc/testsuite/rust.test/xfail_compile/array_empty_list.rs b/gcc/testsuite/rust.test/xfail_compile/array_empty_list.rs index 191f533..76e082a 100644 --- a/gcc/testsuite/rust.test/xfail_compile/array_empty_list.rs +++ b/gcc/testsuite/rust.test/xfail_compile/array_empty_list.rs @@ -1,4 +1,4 @@ fn main() { let arr = []; - // { dg-error "type annotations needed" "" { target { *-*-* } } .-1 } + // { dg-error "type annotations needed" "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/arrays2.rs b/gcc/testsuite/rust.test/xfail_compile/arrays2.rs index e355080..9c788db 100644 --- a/gcc/testsuite/rust.test/xfail_compile/arrays2.rs +++ b/gcc/testsuite/rust.test/xfail_compile/arrays2.rs @@ -1,4 +1,4 @@ fn main() { let array: [i32; 5] = [1, 2, 3]; - // { dg-error "expected ..i32:5.. got ..i32:3.." "" { target { *-*-* } } .-1 } + // { dg-error "expected ..i32:5.. got ..i32:3.." "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/break1.rs b/gcc/testsuite/rust.test/xfail_compile/break1.rs index 33053cf..74f2809 100644 --- a/gcc/testsuite/rust.test/xfail_compile/break1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/break1.rs @@ -2,5 +2,5 @@ fn main() { let a; a = 1; break a; // { dg-error "cannot `break` outside of a loop" } - // { dg-error "failed to type resolve expression" "" { target { *-*-* } } .-1 } + // { dg-error "failed to type resolve expression" "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/break2.rs b/gcc/testsuite/rust.test/xfail_compile/break2.rs index da7fa77..4279e70 100644 --- a/gcc/testsuite/rust.test/xfail_compile/break2.rs +++ b/gcc/testsuite/rust.test/xfail_compile/break2.rs @@ -1,4 +1,3 @@ -// { dg-excess-errors "Noisy error and debug" } fn main() { let mut a = 1; let mut b = 1; @@ -6,8 +5,8 @@ fn main() { let mut c; while b > 10 { if (b == 2) { - break b; // { dg-error "can only break with a value inside `loop`" - // { dg-error "failed to type resolve expression" "" { target { *-*-* } } .-1 } + break b; // { dg-error "can only break with a value inside `loop`" } + // { dg-error "failed to type resolve expression" "" { target *-*-* } .-1 } } c = a + b; a = b; diff --git a/gcc/testsuite/rust.test/xfail_compile/continue1.rs b/gcc/testsuite/rust.test/xfail_compile/continue1.rs index f6314ca..7d8e083 100644 --- a/gcc/testsuite/rust.test/xfail_compile/continue1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/continue1.rs @@ -4,7 +4,7 @@ fn main() { let _fib = { continue; // { dg-error "cannot `continue` outside of a loop" } - // { dg-error "failed to type resolve expression" "" { target { *-*-* } } .-1 } + // { dg-error "failed to type resolve expression" "" { target *-*-* } .-1 } 123 }; } diff --git a/gcc/testsuite/rust.test/xfail_compile/deadcode_err1.rs b/gcc/testsuite/rust.test/xfail_compile/deadcode_err1.rs index 8283231..1dbe957 100644 --- a/gcc/testsuite/rust.test/xfail_compile/deadcode_err1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/deadcode_err1.rs @@ -3,7 +3,7 @@ fn foo() -> i32 { let mut a = 1; // { dg-warning "unreachable statement" } a = 1.1; // { dg-warning "unreachable statement" } - // { dg-error "expected .<integer>. got .<float>." "" { target { *-*-* } } .-1 } + // { dg-error "expected .<integer>. got .<float>." "" { target *-*-* } .-1 } } fn main() { diff --git a/gcc/testsuite/rust.test/xfail_compile/expected_type_args2.rs b/gcc/testsuite/rust.test/xfail_compile/expected_type_args2.rs index 4b1f704..7945420 100644 --- a/gcc/testsuite/rust.test/xfail_compile/expected_type_args2.rs +++ b/gcc/testsuite/rust.test/xfail_compile/expected_type_args2.rs @@ -2,5 +2,5 @@ struct Foo<A>(A); fn main() { let a: Foo = Foo::<i32>(123); - // { dg-error "generic item takes at least 1 type arguments but 0 were supplied" "" { target { *-*-* } } .-1 } + // { dg-error "generic item takes at least 1 type arguments but 0 were supplied" "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/expected_type_args3.rs b/gcc/testsuite/rust.test/xfail_compile/expected_type_args3.rs index dc70f76..ba07239 100644 --- a/gcc/testsuite/rust.test/xfail_compile/expected_type_args3.rs +++ b/gcc/testsuite/rust.test/xfail_compile/expected_type_args3.rs @@ -1,7 +1,7 @@ struct Foo<A>(A); impl Foo { - // { dg-error "generic item takes at least 1 type arguments but 0 were supplied" "" { target { *-*-* } } .-1 } + // { dg-error "generic item takes at least 1 type arguments but 0 were supplied" "" { target *-*-* } .-1 } fn test() -> i32 { 123 } diff --git a/gcc/testsuite/rust.test/xfail_compile/func2.rs b/gcc/testsuite/rust.test/xfail_compile/func2.rs index 1a8a30b..219bbfe 100644 --- a/gcc/testsuite/rust.test/xfail_compile/func2.rs +++ b/gcc/testsuite/rust.test/xfail_compile/func2.rs @@ -1,10 +1,9 @@ -// { dg-excess-errors "Noisy error and debug" } fn test(a: i32, b: i32) -> i32 { a + b } fn main() { - let a = test(1); // { dg-error "unexpected number of arguments 1 expected 2" - // { dg-error "failed to lookup type to CallExpr" "" { target { *-*-* } } .-1 } - // { dg-error "failed to type resolve expression" "" { target { *-*-* } } .-2 } + let a = test(1); // { dg-error "unexpected number of arguments 1 expected 2" } + // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-1 } + // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/generic-default1.rs b/gcc/testsuite/rust.test/xfail_compile/generic-default1.rs index e5f94910..1b04f7d 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generic-default1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generic-default1.rs @@ -1,4 +1,4 @@ -// { dg-error "unresolved type" "" { target { *-*-* } } 0 } +// { dg-error "unresolved type" "" { target *-*-* } 0 } struct Foo<A = i321>(A); // { dg-error "failed to resolve TypePath: i321" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/rust.test/xfail_compile/generics1.rs b/gcc/testsuite/rust.test/xfail_compile/generics1.rs index 7042099..de1bbf5 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics1.rs @@ -1,4 +1,4 @@ -// { dg-error "expected .i32. got .i8." "" { target { *-*-* } } 0 } +// { dg-error "expected .i32. got .i8." "" { target *-*-* } 0 } struct GenericStruct<T>(T, usize); diff --git a/gcc/testsuite/rust.test/xfail_compile/generics11.rs b/gcc/testsuite/rust.test/xfail_compile/generics11.rs index fc46b2e..4d3b9e1 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics11.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics11.rs @@ -8,5 +8,5 @@ impl<T> Foo<T> { fn main() { let a = Foo::test(); - // { dg-error "type annotations needed" "" { target { *-*-* } } .-1 } + // { dg-error "type annotations needed" "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/generics2.rs b/gcc/testsuite/rust.test/xfail_compile/generics2.rs index eb53c24..5812b13 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics2.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics2.rs @@ -1,4 +1,4 @@ -// { dg-error "expected .i32. got .i8." "" { target { *-*-* } } 0 } +// { dg-error "expected .i32. got .i8." "" { target *-*-* } 0 } struct GenericStruct<T>(T, usize); diff --git a/gcc/testsuite/rust.test/xfail_compile/generics3.rs b/gcc/testsuite/rust.test/xfail_compile/generics3.rs index bc49a65..2d42105 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics3.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics3.rs @@ -1,4 +1,4 @@ -// { dg-error "expected .i32. got .i8." "" { target { *-*-* } } 0 } +// { dg-error "expected .i32. got .i8." "" { target *-*-* } 0 } struct GenericStruct<T>(T, usize); fn main() { diff --git a/gcc/testsuite/rust.test/xfail_compile/generics5.rs b/gcc/testsuite/rust.test/xfail_compile/generics5.rs index 5b03bd9..e70afa8 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics5.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics5.rs @@ -1,6 +1,6 @@ // Current errors are too noisy to match specific ones. -// { dg-error "failed to resolve TypePath: T" "" { target { *-*-* } } 0 } -// { dg-error "unresolved type" "" { target { *-*-* } } 0 } +// { dg-error "failed to resolve TypePath: T" "" { target *-*-* } 0 } +// { dg-error "unresolved type" "" { target *-*-* } 0 } struct GenericStruct<T>(T, usize); diff --git a/gcc/testsuite/rust.test/xfail_compile/generics6.rs b/gcc/testsuite/rust.test/xfail_compile/generics6.rs index 256d2aa..4cf45fd 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics6.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics6.rs @@ -4,7 +4,7 @@ struct Foo<A> { } impl Foo<isize> { - fn test() -> i32 { // {dg-error "possible candidate" } + fn test() -> i32 { // { dg-error "possible candidate" "TODO" { xfail *-*-* } } 123 } @@ -14,7 +14,7 @@ impl Foo<isize> { } impl Foo<f32> { - fn test() -> i32 { // {dg-error "possible candidate" } + fn test() -> i32 { // { dg-error "possible candidate" "TODO" { xfail *-*-* } } 123 } diff --git a/gcc/testsuite/rust.test/xfail_compile/generics9.rs b/gcc/testsuite/rust.test/xfail_compile/generics9.rs index c1ff89b..3c5a244 100644 --- a/gcc/testsuite/rust.test/xfail_compile/generics9.rs +++ b/gcc/testsuite/rust.test/xfail_compile/generics9.rs @@ -1,6 +1,6 @@ // { dg-excess-errors "Noisy error and debug" } struct Foo<A, B = (A, B)>(A, B); -// { dg-error "failed to resolve TypePath: B" "" { target { *-*-* } } .-1 } +// { dg-error "failed to resolve TypePath: B" "" { target *-*-* } .-1 } fn main() { let a: Foo<bool>; diff --git a/gcc/testsuite/rust.test/xfail_compile/missing_return1.rs b/gcc/testsuite/rust.test/xfail_compile/missing_return1.rs index d4ed4d9..00bf393 100644 --- a/gcc/testsuite/rust.test/xfail_compile/missing_return1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/missing_return1.rs @@ -1,4 +1,4 @@ -// { dg-error "expected .* got .*" "" { target { *-*-* } } 0 } +// { dg-error "expected .* got .*" "" { target *-*-* } 0 } fn test1() -> i32 {} fn main() { diff --git a/gcc/testsuite/rust.test/xfail_compile/struct_init1.rs b/gcc/testsuite/rust.test/xfail_compile/struct_init1.rs index 87ed443..0554f29 100644 --- a/gcc/testsuite/rust.test/xfail_compile/struct_init1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/struct_init1.rs @@ -5,5 +5,5 @@ struct Foo { fn main() { let a = Foo { 0: 10.0, 1: 20.0 }; // { dg-error "failed to resolve type for field" } - // { dg-error "unknown field" "" { target { *-*-* } } .-1 } + // { dg-error "unknown field" "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/tuple_struct1.rs b/gcc/testsuite/rust.test/xfail_compile/tuple_struct1.rs index 5e45c1f..87e4c3b 100644 --- a/gcc/testsuite/rust.test/xfail_compile/tuple_struct1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/tuple_struct1.rs @@ -5,6 +5,6 @@ struct Foo { fn main() { let a = Foo(1, 2); // { dg-error "expected function, tuple struct or tuple variant, found struct `Foo`" } - // { dg-error "failed to lookup type to CallExpr" "" { target { *-*-* } } .-1 } - // { dg-error "failed to type resolve expression" "" { target { *-*-* } } .-2 } + // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-1 } + // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/tuple_struct2.rs b/gcc/testsuite/rust.test/xfail_compile/tuple_struct2.rs index 8e2f74b..dba0511 100644 --- a/gcc/testsuite/rust.test/xfail_compile/tuple_struct2.rs +++ b/gcc/testsuite/rust.test/xfail_compile/tuple_struct2.rs @@ -2,6 +2,6 @@ struct Bar(i32, i32, bool); fn main() { let a = Bar(1, 2); // { dg-error "unexpected number of arguments 2 expected 3" } - // { dg-error "failed to lookup type to CallExpr" "" { target { *-*-* } } .-1 } - // { dg-error "failed to type resolve expression" "" { target { *-*-* } } .-2 } + // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-1 } + // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/type-bindings1.rs b/gcc/testsuite/rust.test/xfail_compile/type-bindings1.rs index 5e00f87..4cd045c 100644 --- a/gcc/testsuite/rust.test/xfail_compile/type-bindings1.rs +++ b/gcc/testsuite/rust.test/xfail_compile/type-bindings1.rs @@ -4,5 +4,5 @@ struct Foo<A, B>(A, B); fn main() { let a; a = Foo::<A = i32, B = f32>(123f32); - // { dg-error "associated type bindings are not allowed here" "" { target { *-*-* } } .-1 } + // { dg-error "associated type bindings are not allowed here" "" { target *-*-* } .-1 } } diff --git a/gcc/testsuite/rust.test/xfail_compile/unconstrained_type_param.rs b/gcc/testsuite/rust.test/xfail_compile/unconstrained_type_param.rs index 34be7fd..c4aaa10 100644 --- a/gcc/testsuite/rust.test/xfail_compile/unconstrained_type_param.rs +++ b/gcc/testsuite/rust.test/xfail_compile/unconstrained_type_param.rs @@ -1,7 +1,7 @@ struct Foo<T>(T, bool); impl<X, Y> Foo<X> { - // { dg-error "unconstrained type parameter" "" { target { *-*-* } } .-1 } + // { dg-error "unconstrained type parameter" "" { target *-*-* } .-1 } fn test() -> Y { 123 } diff --git a/gcc/testsuite/rust.test/xfail_compile/unterminated_c_comment.rs b/gcc/testsuite/rust.test/xfail_compile/unterminated_c_comment.rs index bc5ef98..619b7b7 100644 --- a/gcc/testsuite/rust.test/xfail_compile/unterminated_c_comment.rs +++ b/gcc/testsuite/rust.test/xfail_compile/unterminated_c_comment.rs @@ -1,2 +1,2 @@ -// { dg-error "unexpected EOF while looking for end of comment" "" { target { *-*-* } } .+1 } +// { dg-error "unexpected EOF while looking for end of comment" "" { target *-*-* } .+1 } /* This comment needs closure :) ! |