Skip to content

Add ignore-backends annotations in failing GCC backend ui tests #144356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/tools/compiletest/src/directives/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ fn parse_cfg_name_directive<'a>(
if name == "gdb-version" {
outcome = MatchOutcome::External;
}

// Don't error out for ignore-backends,as it is handled elsewhere.
if name == "backends" {
outcome = MatchOutcome::External;
}
}

ParsedNameDirective {
Expand Down
1 change: 1 addition & 0 deletions tests/ui/allocator/no_std-alloc-error-handler-custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ ignore-android no libc
//@ ignore-emscripten no libc
//@ ignore-sgx no libc
//@ ignore-backends: gcc
//@ only-linux
//@ compile-flags:-C panic=abort
//@ aux-build:helper.rs
Expand Down
1 change: 1 addition & 0 deletions tests/ui/allocator/no_std-alloc-error-handler-default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ ignore-android no libc
//@ ignore-emscripten no libc
//@ ignore-sgx no libc
//@ ignore-backends: gcc
//@ only-linux
//@ compile-flags:-C panic=abort
//@ aux-build:helper.rs
Expand Down
1 change: 1 addition & 0 deletions tests/ui/asm/may_unwind.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ run-pass
//@ needs-asm-support
//@ needs-unwind
//@ ignore-backends: gcc

#![feature(asm_unwind)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/asm/x86_64/may_unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ run-pass
//@ needs-asm-support
//@ needs-unwind
//@ ignore-backends: gcc

#![feature(asm_unwind)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/async-await/deep-futures-are-freeze.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ build-pass
//@ compile-flags: -Copt-level=s -Clto=fat
//@ no-prefer-dynamic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ edition: 2021
//@ known-bug: #108309

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/dont-project-to-specializable-projection.rs:13:5
--> $DIR/dont-project-to-specializable-projection.rs:14:5
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found future
|
note: type in trait
--> $DIR/dont-project-to-specializable-projection.rs:9:5
--> $DIR/dont-project-to-specializable-projection.rs:10:5
|
LL | async fn foo(_: T) -> &'static str;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: expected signature `fn(_) -> impl Future<Output = &'static str>`
found signature `fn(_) -> impl Future<Output = &'static str>`

error: async associated function in trait cannot be specialized
--> $DIR/dont-project-to-specializable-projection.rs:13:5
--> $DIR/dont-project-to-specializable-projection.rs:14:5
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: specialization behaves in inconsistent and surprising ways with async functions in traits, and for now is disallowed

error[E0599]: no method named `poll` found for struct `Pin<&mut impl Future<Output = ()>>` in the current scope
--> $DIR/dont-project-to-specializable-projection.rs:48:28
--> $DIR/dont-project-to-specializable-projection.rs:49:28
|
LL | match fut.as_mut().poll(ctx) {
| ^^^^ method not found in `Pin<&mut impl Future<Output = ()>>`
Expand Down
1 change: 1 addition & 0 deletions tests/ui/backtrace/dylib-dep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//@ ignore-fuchsia Backtraces not symbolized
//@ ignore-musl musl doesn't support dynamic libraries (at least when the original test was written).
//@ needs-unwind
//@ ignore-backends: gcc
//@ compile-flags: -g -Copt-level=0 -Cstrip=none -Cforce-frame-pointers=yes
//@ ignore-emscripten Requires custom symbolization code
//@ aux-crate: dylib_dep_helper=dylib-dep-helper.rs
Expand Down
1 change: 1 addition & 0 deletions tests/ui/cfg/cfg-panic-abort.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ build-pass
//@ compile-flags: -C panic=abort
//@ no-prefer-dynamic
//@ ignore-backends: gcc

#[cfg(panic = "unwind")]
pub fn bad() -> i32 { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//@ run-pass
//@ ignore-backends: gcc

#![allow(dead_code)]
// check that we don't have linear stack usage with multiple calls to `push`

Expand Down
1 change: 1 addition & 0 deletions tests/ui/codegen/equal-pointers-unequal/as-cast/inline1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1432161340

Expand Down
1 change: 1 addition & 0 deletions tests/ui/codegen/equal-pointers-unequal/as-cast/inline2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1432161340

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// https://github.com/rust-lang/rust/issues/107975#issuecomment-1431758601

Expand Down
1 change: 1 addition & 0 deletions tests/ui/codegen/equal-pointers-unequal/as-cast/zero.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Derived from https://github.com/rust-lang/rust/issues/107975#issuecomment-1431758601

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1432161340

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1432161340

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// https://github.com/rust-lang/rust/issues/107975#issuecomment-1431758601

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Derived from https://github.com/rust-lang/rust/issues/107975#issuecomment-1431758601

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1432161340

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1432161340

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// https://github.com/rust-lang/rust/issues/107975#issuecomment-1431758601

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #107975
//@ compile-flags: -Copt-level=2
//@ run-pass
//@ ignore-backends: gcc

// Derived from https://github.com/rust-lang/rust/issues/107975#issuecomment-1431758601

Expand Down
2 changes: 2 additions & 0 deletions tests/ui/consts/const-eval/parse_ints.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ ignore-backends: gcc

const _OK: () = match i32::from_str_radix("-1234", 10) {
Ok(x) => assert!(x == -1234),
Err(_) => panic!(),
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/consts/const-eval/parse_ints.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
--> $DIR/parse_ints.rs:5:24
--> $DIR/parse_ints.rs:7:24
|
LL | const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_TOO_LOW` failed inside this call
Expand All @@ -11,7 +11,7 @@ note: inside `core::num::<impl u64>::from_ascii_radix`
= note: this error originates in the macro `from_str_int_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
--> $DIR/parse_ints.rs:6:25
--> $DIR/parse_ints.rs:8:25
|
LL | const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_TOO_HIGH` failed inside this call
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/const_cmp_type_id.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ compile-flags: -Znext-solver
#![feature(const_type_id, const_trait_impl, const_cmp)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/const_cmp_type_id.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0015]: cannot call non-const operator in constants
--> $DIR/const_cmp_type_id.rs:10:18
--> $DIR/const_cmp_type_id.rs:11:18
|
LL | let _a = TypeId::of::<u8>() < TypeId::of::<u16>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/issue-73976-monomorphic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ check-pass
//
// This test is complement to the test in issue-73976-polymorphic.rs.
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/consts/issue-94675.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ ignore-backends: gcc

#![feature(const_trait_impl)]

struct Foo<'a> {
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/consts/issue-94675.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error[E0277]: the trait bound `Vec<usize>: [const] Index<_>` is not satisfied
--> $DIR/issue-94675.rs:9:9
--> $DIR/issue-94675.rs:11:9
|
LL | self.bar[0] = baz.len();
| ^^^^^^^^^^^

error[E0277]: the trait bound `Vec<usize>: [const] IndexMut<usize>` is not satisfied
--> $DIR/issue-94675.rs:9:9
--> $DIR/issue-94675.rs:11:9
|
LL | self.bar[0] = baz.len();
| ^^^^^^^^^^^

error[E0277]: the trait bound `Vec<usize>: [const] Index<usize>` is not satisfied
--> $DIR/issue-94675.rs:9:9
--> $DIR/issue-94675.rs:11:9
|
LL | self.bar[0] = baz.len();
| ^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/issue-miri-1910.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ error-pattern unable to turn pointer into raw bytes
//@ normalize-stderr: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC"

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/issue-miri-1910.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: unable to turn pointer into integer
--> $DIR/issue-miri-1910.rs:7:5
--> $DIR/issue-miri-1910.rs:8:5
|
LL | (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `C` failed here
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/missing_span_in_backtrace.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't do anything backend-specific... so this is a GCC backend bug, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize other ui tests I added annotations to were backend specific. Anyway, I added this annotation because they fail with current GCC backend.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize other ui tests I added annotations to were backend specific

I don't know if they do.^^ I just noticed this annotation since it caused a conflict in my PR, and went "hu? how could this possibly fail in one backend only?" All the logic for this test it outside the backend as far as I know...

But anyway, it seems you are treating all these ignore-backends: gcc annotations as bug. Many ignore annotations are not bugs, they reflect that the test just fundamentally cannot work in that setting. That's why I got confused here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, makes more sense. Yes it's currently bugs for GCC backend. :)

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ compile-flags: -Z ui-testing=no

use std::{
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/consts/missing_span_in_backtrace.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0080]: unable to copy parts of a pointer from memory at ALLOC0
--> $DIR/missing_span_in_backtrace.rs:14:9
--> $DIR/missing_span_in_backtrace.rs:15:9
|
14 | / ptr::swap_nonoverlapping(
15 | | &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
16 | | &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
17 | | mem::size_of::<&i32>(),
18 | | );
15 | / ptr::swap_nonoverlapping(
16 | | &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
17 | | &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
18 | | mem::size_of::<&i32>(),
19 | | );
| |_________^ evaluation of `X` failed inside this call
|
= help: this code performed an operation that depends on the underlying bytes representing a pointer
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/try-operator.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ run-pass

#![feature(try_trait_v2)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/coroutine/panic-drops-resume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc

#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/coroutine/panic-drops.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc

#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/coroutine/panic-safe.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-pass
//@ needs-unwind

//@ ignore-backends: gcc

#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/coroutine/resume-after-return.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ ignore-backends: gcc
//@ run-pass
//@ needs-unwind

Expand Down
1 change: 1 addition & 0 deletions tests/ui/coroutine/unwind-abort-mix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//@ aux-build:unwind-aux.rs
//@ compile-flags: -Cpanic=abort
//@ needs-unwind
//@ ignore-backends: gcc
extern crate unwind_aux;

pub fn main() {
Expand Down
1 change: 1 addition & 0 deletions tests/ui/delegation/fn-header.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ check-pass
//@ edition:2018
//@ aux-crate:fn_header_aux=fn-header-aux.rs
//@ ignore-backends: gcc

#![feature(c_variadic)]
#![feature(fn_delegation)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/drop/dynamic-drop-async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//@ run-pass
//@ needs-unwind
//@ edition:2018
//@ ignore-backends: gcc

#![allow(unused)]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/drop/dynamic-drop.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc

#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
#![feature(if_let_guard)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/intrinsics/panic-uninitialized-zeroed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//@ revisions: default strict
//@ [strict]compile-flags: -Zstrict-init-checks
//@ needs-subprocess
//@ ignore-backends: gcc

#![allow(deprecated, invalid_value)]
#![feature(never_type)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-14875.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc

// Check that values are not leaked when a dtor panics (#14875)

Expand Down
1 change: 1 addition & 0 deletions tests/ui/issues/issue-29948.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc

use std::panic;

Expand Down
1 change: 1 addition & 0 deletions tests/ui/iterators/iter-sum-overflow-debug.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
//@ needs-unwind
//@ ignore-backends: gcc
//@ compile-flags: -C debug_assertions=yes

use std::panic;
Expand Down
Loading
Loading