diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index 268011a50eb14..c58629111ac00 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -1382,7 +1382,11 @@ impl InvocationCollectorNode for Box { // This lets `parse_external_mod` catch cycles if it's self-referential. let file_path = match inline { Inline::Yes => None, - Inline::No { .. } => mod_file_path_from_attr(ecx.sess, &node.attrs, &dir_path), + Inline::No { .. } => mod_file_path_from_attr( + ecx.sess, + &node.attrs, + &ecx.current_expansion.module.dir_path, + ), }; (file_path, dir_path, dir_ownership) } diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs index b8fb1fb6d3a52..dbff5e30828a9 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs @@ -9,9 +9,7 @@ pub(crate) fn target() -> Target { base.features = "+cmpxchg16b,+lahfsahf,+popcnt,+sse3,+sse4.1,+sse4.2,+ssse3".into(); base.max_atomic_width = Some(128); base.stack_probes = StackProbeType::Inline; - base.supported_sanitizers = - SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK | SanitizerSet::SAFESTACK; - base.default_sanitizers = SanitizerSet::SAFESTACK; + base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK; base.supports_xray = true; Target { diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs index 903c3998fd4b6..38c6be6069e9a 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs @@ -519,11 +519,13 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { }; let mut local_visitor = FindInferSourceVisitor::new(self, typeck_results, term, ty); + let mut body_from_expansion = false; if let Some(body) = self.tcx.hir_maybe_body_owned_by(self.tcx.typeck_root_def_id_local(body_def_id)) { let expr = body.value; local_visitor.visit_expr(expr); + body_from_expansion = body.value.span.from_expansion(); } let Some(InferSource { span, kind }) = local_visitor.infer_source else { @@ -566,6 +568,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { term, &arg_data, typeck_results, + body_from_expansion, span, ); @@ -705,6 +708,7 @@ impl<'tcx> InferSourceKind<'tcx> { term: Term<'tcx>, arg_data: &'local InferenceDiagnosticsData, typeck_results: &TypeckResults<'tcx>, + body_from_expansion: bool, span: Span, ) -> Option> where @@ -799,7 +803,7 @@ impl<'tcx> InferSourceKind<'tcx> { p.into_buffer() }; - let suggestion = if have_turbofish { + let suggestion = if have_turbofish || body_from_expansion { None } else if generic_args.len() == 1 && used_fallback { match param.kind { diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs index 862f38d97c8cf..9c1485bbf5665 100644 --- a/src/tools/compiletest/src/runtest/run_make.rs +++ b/src/tools/compiletest/src/runtest/run_make.rs @@ -203,6 +203,11 @@ impl TestCx<'_> { // through a specific CI runner). .env("LLVM_COMPONENTS", &self.config.llvm_components); + if let Some(codegen_backend) = &self.config.override_codegen_backend { + // In case it's a different codegen backend than LLVM. + cmd.env("RUSTC_CODEGEN_BACKEND", codegen_backend.as_str()); + } + // The `run-make-cargo` and `build-std` suites need an in-tree `cargo`, `run-make` does not. if matches!(self.config.suite, TestSuite::RunMakeCargo | TestSuite::BuildStd) { cmd.env( diff --git a/src/tools/run-make-support/src/external_deps/rustc.rs b/src/tools/run-make-support/src/external_deps/rustc.rs index 8168e0ab07922..8b28105abe5ed 100644 --- a/src/tools/run-make-support/src/external_deps/rustc.rs +++ b/src/tools/run-make-support/src/external_deps/rustc.rs @@ -76,6 +76,9 @@ pub fn rustc_path() -> String { fn setup_common() -> Command { let mut cmd = Command::new(rustc_path()); set_host_compiler_dylib_path(&mut cmd); + if let Ok(codegen_backend) = std::env::var("RUSTC_CODEGEN_BACKEND") { + cmd.arg(format!("-Zcodegen-backend={codegen_backend}")); + } cmd } diff --git a/tests/assembly-llvm/stack-protector/stack-protector-target-support.rs b/tests/assembly-llvm/stack-protector/stack-protector-target-support.rs index f883e7ac8691f..9f182985d1573 100644 --- a/tests/assembly-llvm/stack-protector/stack-protector-target-support.rs +++ b/tests/assembly-llvm/stack-protector/stack-protector-target-support.rs @@ -177,15 +177,13 @@ //@ compile-flags: -C opt-level=2 #![crate_type = "lib"] -#![feature(no_core, lang_items, sanitize)] +#![feature(no_core, lang_items)] #![crate_type = "lib"] #![no_core] extern crate minicore; use minicore::*; -// We only do this because we can't disable default sanitizers via compile-flags. -#[sanitize(safestack = "off")] #[no_mangle] pub fn foo() { // CHECK: foo{{:|()}} diff --git a/tests/crashes/140693.rs b/tests/crashes/140693.rs new file mode 100644 index 0000000000000..c8179ab9ef0f5 --- /dev/null +++ b/tests/crashes/140693.rs @@ -0,0 +1,10 @@ +//@ known-bug: #140693 +#![crate_type = "sdylib"] + +pub trait Trait { + type Type; +} +pub struct S; + +#[export_stable] +pub extern "C" fn foo1(_x: ::Type) {} diff --git a/tests/crashes/146210.rs b/tests/crashes/146210.rs new file mode 100644 index 0000000000000..674f4956ae6de --- /dev/null +++ b/tests/crashes/146210.rs @@ -0,0 +1,10 @@ +//@ known-bug: #146210 +//@ edition: 2024 +//@ compile-flags: -Zvalidate-mir --crate-type lib +use core::pin::Pin; + +fn bar(non_send: T) -> Pin + Send>> { + Box::pin(async { + non_send; + }) +} diff --git a/tests/crashes/146353.rs b/tests/crashes/146353.rs new file mode 100644 index 0000000000000..9d354408b19f6 --- /dev/null +++ b/tests/crashes/146353.rs @@ -0,0 +1,4 @@ +//@ known-bug: #146353 +const BIG_CHAIN: u8 = (); +trait NeverSend = !Send; +fn main() {} diff --git a/tests/crashes/149015.rs b/tests/crashes/149015.rs new file mode 100644 index 0000000000000..c262dc7d47fe3 --- /dev/null +++ b/tests/crashes/149015.rs @@ -0,0 +1,10 @@ +//@ known-bug: #149015 +trait Trait1 { + type Assoc; +} + +trait Trait2 {} + +impl Trait1 for ::Assoc { + type Assoc = (); +} diff --git a/tests/crashes/152204.rs b/tests/crashes/152204.rs new file mode 100644 index 0000000000000..8c9be213d9ea5 --- /dev/null +++ b/tests/crashes/152204.rs @@ -0,0 +1,9 @@ +//@ known-bug: #152204 +//@ compile-flags: -Copt-level=0 +#![feature(portable_simd)] + +fn main() { + if false { + let _ = core::simd::Simd::::splat(0); + } +} diff --git a/tests/crashes/153368.rs b/tests/crashes/153368.rs new file mode 100644 index 0000000000000..53e2aab4680fb --- /dev/null +++ b/tests/crashes/153368.rs @@ -0,0 +1,10 @@ +//@ known-bug: #153368 +//@ compile-flags: -Znext-solver=globally +trait Foo: Bar + Bar {} +trait Bar { + fn bar(self) -> T; +} + +fn test_infer_version(x: &dyn Foo) { + x.bar() +} diff --git a/tests/crashes/154367.rs b/tests/crashes/154367.rs new file mode 100644 index 0000000000000..54e55ffd96ae9 --- /dev/null +++ b/tests/crashes/154367.rs @@ -0,0 +1,6 @@ +//@ known-bug: #154367 +//@ compile-flags: -Copt-level=0 +#![feature(unsafe_binders)] + +fn main() { panic:: &'a ()>(); } +fn panic() { panic!() } diff --git a/tests/crashes/155482.rs b/tests/crashes/155482.rs new file mode 100644 index 0000000000000..a2182f83d737c --- /dev/null +++ b/tests/crashes/155482.rs @@ -0,0 +1,7 @@ +//@ known-bug: #155482 +trait TraitA < AsA = impl TraitB < { +#[derive(Hash)] + enum A; + struct A; +} +>> ; diff --git a/tests/crashes/155497.rs b/tests/crashes/155497.rs new file mode 100644 index 0000000000000..ed96c205d08b5 --- /dev/null +++ b/tests/crashes/155497.rs @@ -0,0 +1,13 @@ +//@ known-bug: #155497 +//@ compile-flags: -Wrust-2021-incompatible-closure-captures +struct Foo((u32, i128)); + +fn main() { + type T = impl async FnOnce() -> T; + let foo: T = Foo(); + let x = move || { + let x = move || { + let Foo((a, b)) = foo; + }; + }; +} diff --git a/tests/crashes/157197.rs b/tests/crashes/157197.rs new file mode 100644 index 0000000000000..6ff4055076535 --- /dev/null +++ b/tests/crashes/157197.rs @@ -0,0 +1,3 @@ +//@ known-bug: #157197 +static C: &'static usize = &(0 | E); +static E: usize = E; diff --git a/tests/crashes/158243.rs b/tests/crashes/158243.rs new file mode 100644 index 0000000000000..576ba0889e5f5 --- /dev/null +++ b/tests/crashes/158243.rs @@ -0,0 +1,12 @@ +//@ known-bug: #158243 +macro_rules! id { + ($x:expr) => { $x }; +} +fn main() { + |id!( + (|| { + use std::ops::Add; + 1.add(3); + }) + )| {}; +} diff --git a/tests/crashes/158773.rs b/tests/crashes/158773.rs new file mode 100644 index 0000000000000..3020ab6206e4b --- /dev/null +++ b/tests/crashes/158773.rs @@ -0,0 +1,16 @@ +//@ known-bug: #158773 +//@ needs-rustc-debug-assertions +//@ compile-flags: -Znext-solver=globally +trait HasLifetime { + type AtLifetime<'a>; +} + +pub struct ExistentialLifetime(S::AtLifetime<'static>); + +impl ExistentialLifetime { + fn new() -> ExistentialLifetime { + ExistentialLifetime(ExistentialLifetime(())) + } +} + +fn main() {} diff --git a/tests/crashes/158797.rs b/tests/crashes/158797.rs new file mode 100644 index 0000000000000..dc451094ba68b --- /dev/null +++ b/tests/crashes/158797.rs @@ -0,0 +1,14 @@ +//@ known-bug: #158797 +#![feature(coroutines)] +#![feature(const_async_blocks)] +#![feature(yield_expr)] +enum Foo { + Bar = ( + #[coroutine] + || yield, + 2, + ) + .1, +} + +fn main() {} diff --git a/tests/crashes/160329.rs b/tests/crashes/160329.rs new file mode 100644 index 0000000000000..e436795e5fca9 --- /dev/null +++ b/tests/crashes/160329.rs @@ -0,0 +1,4 @@ +//@ known-bug: #160329 +#![feature(autodiff)] +#[core::autodiff::autodiff_forward(fd_inner, Dual)] +fn f(_x: struct S) {} diff --git a/tests/crashes/160490.rs b/tests/crashes/160490.rs new file mode 100644 index 0000000000000..5f713ed268042 --- /dev/null +++ b/tests/crashes/160490.rs @@ -0,0 +1,2 @@ +//@ known-bug: #160490 +fn f(...: u8) {} diff --git a/tests/run-make/amdgpu-kd/rmake.rs b/tests/run-make/amdgpu-kd/rmake.rs index cba9030641dec..cd280ed83825e 100644 --- a/tests/run-make/amdgpu-kd/rmake.rs +++ b/tests/run-make/amdgpu-kd/rmake.rs @@ -5,6 +5,7 @@ //@ needs-llvm-components: amdgpu //@ needs-rust-lld +//@ ignore-backends: gcc use run_make_support::targets::is_windows_gnu; use run_make_support::{llvm_readobj, rustc}; diff --git a/tests/run-make/atomic-lock-free/rmake.rs b/tests/run-make/atomic-lock-free/rmake.rs index 77e136e8487f3..874b3cea5ba30 100644 --- a/tests/run-make/atomic-lock-free/rmake.rs +++ b/tests/run-make/atomic-lock-free/rmake.rs @@ -2,6 +2,8 @@ // guaranteed to be lock-free. //@ only-linux +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{llvm_components_contain, llvm_readobj, rustc}; diff --git a/tests/run-make/avr-custom-target-missing-cpu/rmake.rs b/tests/run-make/avr-custom-target-missing-cpu/rmake.rs index d076eb3d378b2..df68846af2d2a 100644 --- a/tests/run-make/avr-custom-target-missing-cpu/rmake.rs +++ b/tests/run-make/avr-custom-target-missing-cpu/rmake.rs @@ -2,6 +2,7 @@ // Make sure that reports the normal missing-CPU diagnostic instead of ICEing // //@ needs-llvm-components: avr +//@ ignore-backends: gcc use run_make_support::rustc; diff --git a/tests/run-make/avr-rjmp-offset/rmake.rs b/tests/run-make/avr-rjmp-offset/rmake.rs index a4a219436ad26..36ab58d17d307 100644 --- a/tests/run-make/avr-rjmp-offset/rmake.rs +++ b/tests/run-make/avr-rjmp-offset/rmake.rs @@ -1,5 +1,7 @@ //@ needs-llvm-components: avr //@ needs-rust-lld +//@ ignore-backends: gcc + //! Regression test for #129301/llvm-project#106722 within `rustc`. //! //! Some LLVM-versions had wrong offsets in the local labels, causing the first diff --git a/tests/run-make/branch-protection-check-IBT/rmake.rs b/tests/run-make/branch-protection-check-IBT/rmake.rs index 2ec6a6bcbdaa8..ba1a338367730 100644 --- a/tests/run-make/branch-protection-check-IBT/rmake.rs +++ b/tests/run-make/branch-protection-check-IBT/rmake.rs @@ -37,6 +37,7 @@ // FIXME(#93754): increase the test coverage of this test. //@ only-x86_64-unknown-linux-gnu //@ ignore-cross-compile +//@ ignore-backends: gcc use run_make_support::{bare_rustc, llvm_readobj}; diff --git a/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs b/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs index 7be68faccc714..420cf0e48e402 100644 --- a/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs +++ b/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs @@ -8,6 +8,8 @@ //@ ignore-sgx: (x86 machine code cannot be directly executed) //@ ignore-pauthtest: (it requires non-trivial compilation of c sources, and only supports dynamic // linking, ignore the test). +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{cc, extra_c_flags, run, rustc, static_lib_name}; diff --git a/tests/run-make/cdylib/rmake.rs b/tests/run-make/cdylib/rmake.rs index 21fd8b486c489..21f62216d8d44 100644 --- a/tests/run-make/cdylib/rmake.rs +++ b/tests/run-make/cdylib/rmake.rs @@ -9,6 +9,8 @@ // - `bar()` which implements basic addition. //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{cc, cwd, dynamic_lib_name, is_windows_msvc, rfs, run, rustc}; diff --git a/tests/run-make/codegen-options-parsing/rmake.rs b/tests/run-make/codegen-options-parsing/rmake.rs index c78b41a88dc69..769365b20c3c3 100644 --- a/tests/run-make/codegen-options-parsing/rmake.rs +++ b/tests/run-make/codegen-options-parsing/rmake.rs @@ -2,6 +2,8 @@ // contain specific helpful indications. //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::regex::Regex; use run_make_support::rustc; diff --git a/tests/run-make/compressed-debuginfo/rmake.rs b/tests/run-make/compressed-debuginfo/rmake.rs index c8bde9cfa221f..45bfaa6041d97 100644 --- a/tests/run-make/compressed-debuginfo/rmake.rs +++ b/tests/run-make/compressed-debuginfo/rmake.rs @@ -2,6 +2,8 @@ //@ only-linux //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc // FIXME: This test isn't comprehensive and isn't covering all possible combinations. diff --git a/tests/run-make/const-destruct-stable-toolchain/rmake.rs b/tests/run-make/const-destruct-stable-toolchain/rmake.rs index c1ff48b3214f0..0f36d71f2c874 100644 --- a/tests/run-make/const-destruct-stable-toolchain/rmake.rs +++ b/tests/run-make/const-destruct-stable-toolchain/rmake.rs @@ -1,5 +1,7 @@ //@ needs-target-std -// +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // Test that the suggestion to constrain a type parameter that is dropped in a const // function with a `[const] Destruct` bound is only offered on nightly, since the bound // requires an unstable feature. diff --git a/tests/run-make/const-trait-stable-toolchain/rmake.rs b/tests/run-make/const-trait-stable-toolchain/rmake.rs index 729b71457e9e8..e2ec58f03db19 100644 --- a/tests/run-make/const-trait-stable-toolchain/rmake.rs +++ b/tests/run-make/const-trait-stable-toolchain/rmake.rs @@ -1,5 +1,7 @@ //@ needs-target-std -// +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // Test output of const super trait errors in both stable and nightly. // We don't want to provide suggestions on stable that only make sense in nightly. diff --git a/tests/run-make/cross-lang-lto-upstream-rlibs/rmake.rs b/tests/run-make/cross-lang-lto-upstream-rlibs/rmake.rs index 7fb0f6903974c..5c61a065a17cb 100644 --- a/tests/run-make/cross-lang-lto-upstream-rlibs/rmake.rs +++ b/tests/run-make/cross-lang-lto-upstream-rlibs/rmake.rs @@ -1,5 +1,7 @@ //@ needs-target-std -// +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // When using the flag -C linker-plugin-lto, static libraries could lose their upstream object // files during compilation. This bug was fixed in #53031, and this test compiles a staticlib // dependent on upstream, checking that the upstream object file still exists after no LTO and diff --git a/tests/run-make/cross-lang-lto/rmake.rs b/tests/run-make/cross-lang-lto/rmake.rs index 8773070b1a9e7..b811c51b895ff 100644 --- a/tests/run-make/cross-lang-lto/rmake.rs +++ b/tests/run-make/cross-lang-lto/rmake.rs @@ -1,5 +1,7 @@ //@ needs-target-std -// +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // This test checks that the object files we generate are actually // LLVM bitcode files (as used by linker LTO plugins) when compiling with // -Clinker-plugin-lto. diff --git a/tests/run-make/embed-source-dwarf/rmake.rs b/tests/run-make/embed-source-dwarf/rmake.rs index f57e6aba13ed8..2eef7df8c44d6 100644 --- a/tests/run-make/embed-source-dwarf/rmake.rs +++ b/tests/run-make/embed-source-dwarf/rmake.rs @@ -3,6 +3,8 @@ //@ ignore-apple //@ ignore-wasm (`object` doesn't handle wasm object files) //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc // This test should be replaced with one in tests/debuginfo once we can easily // tell via GDB or LLDB if debuginfo contains source code. Cheap tricks in LLDB diff --git a/tests/run-make/emit-stack-sizes/rmake.rs b/tests/run-make/emit-stack-sizes/rmake.rs index 2e7f40896a5d6..ba617f530129a 100644 --- a/tests/run-make/emit-stack-sizes/rmake.rs +++ b/tests/run-make/emit-stack-sizes/rmake.rs @@ -10,6 +10,8 @@ //@ only-elf // Reason: this feature only works when the output object format is ELF. // This won't be the case on Windows/OSX - for example, OSX produces a Mach-O binary. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{llvm_readobj, rustc}; diff --git a/tests/run-make/extern-fn-explicit-align/rmake.rs b/tests/run-make/extern-fn-explicit-align/rmake.rs index fb153f92103b2..c2dca1be2afa4 100644 --- a/tests/run-make/extern-fn-explicit-align/rmake.rs +++ b/tests/run-make/extern-fn-explicit-align/rmake.rs @@ -7,6 +7,8 @@ //@ ignore-cross-compile // Reason: the compiled binary is executed +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{build_native_static_lib, run, rustc}; diff --git a/tests/run-make/fat-lto-module-summary/rmake.rs b/tests/run-make/fat-lto-module-summary/rmake.rs index f04416c68fd96..a1021df91e8db 100644 --- a/tests/run-make/fat-lto-module-summary/rmake.rs +++ b/tests/run-make/fat-lto-module-summary/rmake.rs @@ -1,3 +1,6 @@ +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{llvm_bcanalyzer, rustc}; fn main() { diff --git a/tests/run-make/fat-then-thin-lto/rmake.rs b/tests/run-make/fat-then-thin-lto/rmake.rs index ef4f26689d4e8..b27eff1065f80 100644 --- a/tests/run-make/fat-then-thin-lto/rmake.rs +++ b/tests/run-make/fat-then-thin-lto/rmake.rs @@ -4,6 +4,8 @@ // and allowing users to build with lto=thin. //@ only-x86_64-unknown-linux-gnu +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{dynamic_lib_name, llvm_objdump, rustc}; diff --git a/tests/run-make/forced-unwind-terminate-pof/rmake.rs b/tests/run-make/forced-unwind-terminate-pof/rmake.rs index 320ddb172b6ec..7b8fe31bce7da 100644 --- a/tests/run-make/forced-unwind-terminate-pof/rmake.rs +++ b/tests/run-make/forced-unwind-terminate-pof/rmake.rs @@ -7,6 +7,8 @@ //@ ignore-cross-compile //@ ignore-windows //Reason: pthread (POSIX threads) is not available on Windows +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{run, rustc}; diff --git a/tests/run-make/issue-149402-suggest-unresolve/rmake.rs b/tests/run-make/issue-149402-suggest-unresolve/rmake.rs index 5bca0c0206cb2..78348b914d1e6 100644 --- a/tests/run-make/issue-149402-suggest-unresolve/rmake.rs +++ b/tests/run-make/issue-149402-suggest-unresolve/rmake.rs @@ -4,6 +4,8 @@ //! //@ only-nightly //@ needs-target-std +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{diff, rustc, similar}; diff --git a/tests/run-make/link-cfg/rmake.rs b/tests/run-make/link-cfg/rmake.rs index 18577fb836dd2..2f55f691d70e9 100644 --- a/tests/run-make/link-cfg/rmake.rs +++ b/tests/run-make/link-cfg/rmake.rs @@ -13,6 +13,7 @@ //@ ignore-cross-compile // Reason: the compiled binary is executed //@ needs-llvm-components: x86 +//@ ignore-backends: gcc use run_make_support::{bare_rustc, build_native_dynamic_lib, build_native_static_lib, run, rustc}; diff --git a/tests/run-make/link-eh-frame-terminator/rmake.rs b/tests/run-make/link-eh-frame-terminator/rmake.rs index 06b77f011ece0..0ee66742a14cf 100644 --- a/tests/run-make/link-eh-frame-terminator/rmake.rs +++ b/tests/run-make/link-eh-frame-terminator/rmake.rs @@ -10,6 +10,8 @@ // Reason: the usage of a large array in the test causes an out-of-memory // error on 32 bit systems. //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{bin_name, llvm_objdump, run, rustc}; diff --git a/tests/run-make/linker-plugin-lto-fat/rmake.rs b/tests/run-make/linker-plugin-lto-fat/rmake.rs index ff5b647a5941f..500c354020944 100644 --- a/tests/run-make/linker-plugin-lto-fat/rmake.rs +++ b/tests/run-make/linker-plugin-lto-fat/rmake.rs @@ -5,6 +5,8 @@ //@ only-x86_64-unknown-linux-gnu //@ needs-rust-lld +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{dynamic_lib_name, llvm_as, llvm_objdump, rustc}; diff --git a/tests/run-make/llvm-ident/rmake.rs b/tests/run-make/llvm-ident/rmake.rs index b4d30ee7bfbe9..2e742d5ae536d 100644 --- a/tests/run-make/llvm-ident/rmake.rs +++ b/tests/run-make/llvm-ident/rmake.rs @@ -1,5 +1,7 @@ //@ only-linux //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::llvm::llvm_bin_dir; use run_make_support::{ diff --git a/tests/run-make/llvm-location-discriminator-limit-dummy-span/rmake.rs b/tests/run-make/llvm-location-discriminator-limit-dummy-span/rmake.rs index 00ae400f71d20..c5c85c6f27dce 100644 --- a/tests/run-make/llvm-location-discriminator-limit-dummy-span/rmake.rs +++ b/tests/run-make/llvm-location-discriminator-limit-dummy-span/rmake.rs @@ -10,6 +10,8 @@ //@ ignore-cross-compile //@ needs-dynamic-linking //@ only-nightly (requires unstable rustc flag) +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc // This test trips a check in the MSVC linker for an outdated processor: // "LNK1322: cannot avoid potential ARM hazard (Cortex-A53 MPCore processor bug #843419)" diff --git a/tests/run-make/lto-avoid-object-duplication/rmake.rs b/tests/run-make/lto-avoid-object-duplication/rmake.rs index 58784b25545c6..9182aad66cc75 100644 --- a/tests/run-make/lto-avoid-object-duplication/rmake.rs +++ b/tests/run-make/lto-avoid-object-duplication/rmake.rs @@ -15,6 +15,8 @@ // Only checking on Unix platforms should suffice. //FIXME(Oneirical): This could be adapted to work on Windows by checking how // that output differs. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{llvm_objdump, regex, rust_lib_name, rustc, static_lib_name}; diff --git a/tests/run-make/lto-empty/rmake.rs b/tests/run-make/lto-empty/rmake.rs index 7146d6e10ef9e..4a37f3fe48a06 100644 --- a/tests/run-make/lto-empty/rmake.rs +++ b/tests/run-make/lto-empty/rmake.rs @@ -6,6 +6,8 @@ // See https://github.com/rust-lang/rust/issues/63349 //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::rustc; diff --git a/tests/run-make/lto-linkage-used-attr/rmake.rs b/tests/run-make/lto-linkage-used-attr/rmake.rs index 12463b79a754b..b3d497e5b407d 100644 --- a/tests/run-make/lto-linkage-used-attr/rmake.rs +++ b/tests/run-make/lto-linkage-used-attr/rmake.rs @@ -6,6 +6,8 @@ //@ only-x86_64-unknown-linux-gnu // Reason: some of the inline assembly directives are architecture-specific. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::rustc; diff --git a/tests/run-make/lto-long-filenames/rmake.rs b/tests/run-make/lto-long-filenames/rmake.rs index f09e427099199..0bf6789bc9bec 100644 --- a/tests/run-make/lto-long-filenames/rmake.rs +++ b/tests/run-make/lto-long-filenames/rmake.rs @@ -8,6 +8,8 @@ // See https://github.com/rust-lang/rust/issues/49914 //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{rfs, rustc}; diff --git a/tests/run-make/lto-long-filenames_cn/rmake.rs b/tests/run-make/lto-long-filenames_cn/rmake.rs index fc25a2ac166b2..83a02e102f008 100644 --- a/tests/run-make/lto-long-filenames_cn/rmake.rs +++ b/tests/run-make/lto-long-filenames_cn/rmake.rs @@ -5,6 +5,8 @@ // as this is not something rustc can fix by itself, // we just skip the test on windows-gnu for now. Hence: //@ ignore-windows-gnu +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{rfs, rustc}; diff --git a/tests/run-make/lto-no-link-whole-rlib/rmake.rs b/tests/run-make/lto-no-link-whole-rlib/rmake.rs index 8cd653d5f0866..d79e962950cde 100644 --- a/tests/run-make/lto-no-link-whole-rlib/rmake.rs +++ b/tests/run-make/lto-no-link-whole-rlib/rmake.rs @@ -5,6 +5,8 @@ //@ ignore-cross-compile // Reason: the compiled binary is executed +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{build_native_static_lib, run, rustc}; diff --git a/tests/run-make/lto-readonly-lib/rmake.rs b/tests/run-make/lto-readonly-lib/rmake.rs index 78f2b580e0df2..14b3da031fcfd 100644 --- a/tests/run-make/lto-readonly-lib/rmake.rs +++ b/tests/run-make/lto-readonly-lib/rmake.rs @@ -6,6 +6,8 @@ // See https://github.com/rust-lang/rust/pull/17619 //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{run, rust_lib_name, rustc, test_while_readonly}; diff --git a/tests/run-make/lto-smoke-c/rmake.rs b/tests/run-make/lto-smoke-c/rmake.rs index 70760f730c05f..3945436b22dfc 100644 --- a/tests/run-make/lto-smoke-c/rmake.rs +++ b/tests/run-make/lto-smoke-c/rmake.rs @@ -5,6 +5,8 @@ //@ ignore-cross-compile // Reason: the compiled binary is executed +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name}; diff --git a/tests/run-make/lto-smoke/rmake.rs b/tests/run-make/lto-smoke/rmake.rs index 692945135cd3d..392cbd4ba6dd3 100644 --- a/tests/run-make/lto-smoke/rmake.rs +++ b/tests/run-make/lto-smoke/rmake.rs @@ -4,6 +4,8 @@ // See https://github.com/rust-lang/rust/issues/10741 //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::rustc; diff --git a/tests/run-make/min-global-align/rmake.rs b/tests/run-make/min-global-align/rmake.rs index 2adaaf172f470..45e20dd6401a7 100644 --- a/tests/run-make/min-global-align/rmake.rs +++ b/tests/run-make/min-global-align/rmake.rs @@ -6,6 +6,8 @@ //@ only-linux // Reason: this test is specific to linux, considering compilation is targeted // towards linux architectures only. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{assert_count_is, llvm_components_contain, rfs, rustc}; diff --git a/tests/run-make/mismatching-target-triples/rmake.rs b/tests/run-make/mismatching-target-triples/rmake.rs index 1bbe945e0da54..020980eef220d 100644 --- a/tests/run-make/mismatching-target-triples/rmake.rs +++ b/tests/run-make/mismatching-target-triples/rmake.rs @@ -5,6 +5,7 @@ // error message is used. // See https://github.com/rust-lang/rust/issues/10814 //@ needs-llvm-components: x86 +//@ ignore-backends: gcc use run_make_support::rustc; diff --git a/tests/run-make/missing-unstable-trait-bound/rmake.rs b/tests/run-make/missing-unstable-trait-bound/rmake.rs index 3f76c65247d8c..753f4abcf32fd 100644 --- a/tests/run-make/missing-unstable-trait-bound/rmake.rs +++ b/tests/run-make/missing-unstable-trait-bound/rmake.rs @@ -2,6 +2,8 @@ //@ ignore-wasm32 //@ ignore-wasm64 // ignore-tidy-linelength +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc // Ensure that on stable we don't suggest restricting with an unsafe trait and we continue // mentioning the rest of the obligation chain. diff --git a/tests/run-make/musl-default-linking/rmake.rs b/tests/run-make/musl-default-linking/rmake.rs index e9d09e359c686..e825a3b812fd7 100644 --- a/tests/run-make/musl-default-linking/rmake.rs +++ b/tests/run-make/musl-default-linking/rmake.rs @@ -5,6 +5,7 @@ use run_make_support::{rustc, serde_json}; // we should be trying to move these targets to dynamically link // musl libc by default. //@ needs-llvm-components: aarch64 arm powerpc x86 +//@ ignore-backends: gcc static LEGACY_STATIC_LINKING_TARGETS: &[&'static str] = &[ "aarch64-unknown-linux-musl", "arm-unknown-linux-musleabi", diff --git a/tests/run-make/naked-symbol-visibility/rmake.rs b/tests/run-make/naked-symbol-visibility/rmake.rs index d73eafcaefea6..69317c872f895 100644 --- a/tests/run-make/naked-symbol-visibility/rmake.rs +++ b/tests/run-make/naked-symbol-visibility/rmake.rs @@ -2,6 +2,8 @@ //@ only-x86_64 //@ needs-target-std //@ needs-crate-type: dylib +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::object::ObjectSymbol; use run_make_support::object::read::{File, Object, Symbol}; diff --git a/tests/run-make/no-builtins-attribute/rmake.rs b/tests/run-make/no-builtins-attribute/rmake.rs index f08316e14ce76..f9ffbaa482c41 100644 --- a/tests/run-make/no-builtins-attribute/rmake.rs +++ b/tests/run-make/no-builtins-attribute/rmake.rs @@ -1,4 +1,7 @@ //@ needs-target-std +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // `no_builtins` is an attribute related to LLVM's optimizations. In order to ensure that it has an // effect on link-time optimizations (LTO), it should be added to function declarations in a crate. // This test uses the `llvm-filecheck` tool to determine that this attribute is successfully diff --git a/tests/run-make/no-builtins-linker-plugin-lto/rmake.rs b/tests/run-make/no-builtins-linker-plugin-lto/rmake.rs index 7133085677377..496e97b4c5c32 100644 --- a/tests/run-make/no-builtins-linker-plugin-lto/rmake.rs +++ b/tests/run-make/no-builtins-linker-plugin-lto/rmake.rs @@ -1,4 +1,6 @@ //@ only-x86_64-unknown-linux-gnu +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use std::fs; use std::path::Path; diff --git a/tests/run-make/no-builtins-lto/rmake.rs b/tests/run-make/no-builtins-lto/rmake.rs index c7c075f1a66e0..fc6fbccad0ed8 100644 --- a/tests/run-make/no-builtins-lto/rmake.rs +++ b/tests/run-make/no-builtins-lto/rmake.rs @@ -1,4 +1,6 @@ //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc // The rlib produced by a no_builtins crate should be explicitly linked // during compilation, and as a result be present in the linker arguments. diff --git a/tests/run-make/optimization-remarks-dir-pgo/rmake.rs b/tests/run-make/optimization-remarks-dir-pgo/rmake.rs index 471ce89f188b7..9a12f6b286ffe 100644 --- a/tests/run-make/optimization-remarks-dir-pgo/rmake.rs +++ b/tests/run-make/optimization-remarks-dir-pgo/rmake.rs @@ -6,6 +6,8 @@ //@ needs-profiler-runtime //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{ has_extension, has_prefix, invalid_utf8_contains, llvm_profdata, run, rustc, shallow_find_files, diff --git a/tests/run-make/output-type-permutations/rmake.rs b/tests/run-make/output-type-permutations/rmake.rs index 8da0bfaa12db8..cc515efd03d0f 100644 --- a/tests/run-make/output-type-permutations/rmake.rs +++ b/tests/run-make/output-type-permutations/rmake.rs @@ -6,6 +6,8 @@ //@ ignore-cross-compile // Reason: some cross-compiled targets don't support various crate types and fail to link. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use std::path::PathBuf; diff --git a/tests/run-make/pgo-branch-weights/rmake.rs b/tests/run-make/pgo-branch-weights/rmake.rs index e74eabc187542..201b36e035250 100644 --- a/tests/run-make/pgo-branch-weights/rmake.rs +++ b/tests/run-make/pgo-branch-weights/rmake.rs @@ -9,6 +9,8 @@ //@ needs-profiler-runtime //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use std::path::Path; diff --git a/tests/run-make/pgo-embed-bc-lto/rmake.rs b/tests/run-make/pgo-embed-bc-lto/rmake.rs index b7eba0c68e343..45774eda523c7 100644 --- a/tests/run-make/pgo-embed-bc-lto/rmake.rs +++ b/tests/run-make/pgo-embed-bc-lto/rmake.rs @@ -4,6 +4,8 @@ //@ needs-profiler-runtime //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use std::path::Path; diff --git a/tests/run-make/pgo-gen-lto/rmake.rs b/tests/run-make/pgo-gen-lto/rmake.rs index 4f7ae9fb24c91..e582a01939062 100644 --- a/tests/run-make/pgo-gen-lto/rmake.rs +++ b/tests/run-make/pgo-gen-lto/rmake.rs @@ -6,6 +6,8 @@ // Reason: this exercises LTO profiling //@ ignore-cross-compile // Reason: the compiled binary is executed +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{cwd, has_extension, has_prefix, run, rustc, shallow_find_files}; diff --git a/tests/run-make/pgo-gen-no-imp-symbols/rmake.rs b/tests/run-make/pgo-gen-no-imp-symbols/rmake.rs index db25eab104a84..19a8316834d23 100644 --- a/tests/run-make/pgo-gen-no-imp-symbols/rmake.rs +++ b/tests/run-make/pgo-gen-no-imp-symbols/rmake.rs @@ -1,5 +1,7 @@ //@ needs-target-std -// +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. // Since these show up as globals in the LLVM IR, the compiler generates dllimport-related // __imp_ stubs for them. This can lead to linker errors because the instrumentation diff --git a/tests/run-make/pgo-indirect-call-promotion/rmake.rs b/tests/run-make/pgo-indirect-call-promotion/rmake.rs index ee09141912b11..cd269c43ac6a3 100644 --- a/tests/run-make/pgo-indirect-call-promotion/rmake.rs +++ b/tests/run-make/pgo-indirect-call-promotion/rmake.rs @@ -9,6 +9,8 @@ // Reason: llvm_profdata is used //@ ignore-cross-compile // Reason: the compiled binary is executed +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{llvm_filecheck, llvm_profdata, rfs, run, rustc}; diff --git a/tests/run-make/pgo-use/rmake.rs b/tests/run-make/pgo-use/rmake.rs index 137b0b859a042..9ece1a3f9a469 100644 --- a/tests/run-make/pgo-use/rmake.rs +++ b/tests/run-make/pgo-use/rmake.rs @@ -7,6 +7,8 @@ //@ needs-profiler-runtime //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{ cwd, has_extension, has_prefix, llvm_filecheck, llvm_profdata, rfs, run_with_args, rustc, diff --git a/tests/run-make/print-cfg/rmake.rs b/tests/run-make/print-cfg/rmake.rs index d5de89c0de151..571a3628c147a 100644 --- a/tests/run-make/print-cfg/rmake.rs +++ b/tests/run-make/print-cfg/rmake.rs @@ -9,6 +9,7 @@ //@ needs-llvm-components: arm x86 webassembly // Note: without the needs-llvm-components it will fail on LLVM built without the required // components listed above. +//@ ignore-backends: gcc use std::collections::HashSet; use std::iter::FromIterator; diff --git a/tests/run-make/print-request-help-stable-unstable/rmake.rs b/tests/run-make/print-request-help-stable-unstable/rmake.rs index a59963da5c497..62cf0483f320d 100644 --- a/tests/run-make/print-request-help-stable-unstable/rmake.rs +++ b/tests/run-make/print-request-help-stable-unstable/rmake.rs @@ -1,6 +1,10 @@ //! Check that unstable print requests are omitted from help if compiler is in stable channel. //! //! Issue: + +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{diff, rustc, similar}; fn main() { diff --git a/tests/run-make/print-target-cpus-native/rmake.rs b/tests/run-make/print-target-cpus-native/rmake.rs index 3bd210654db7f..52560f7b0040f 100644 --- a/tests/run-make/print-target-cpus-native/rmake.rs +++ b/tests/run-make/print-target-cpus-native/rmake.rs @@ -1,6 +1,7 @@ //@ ignore-cross-compile //@ needs-llvm-components: aarch64 x86 // FIXME(#132514): Is needs-llvm-components actually necessary for this test? +//@ ignore-backends: gcc use run_make_support::{assert_contains_regex, rfs, rustc, target}; diff --git a/tests/run-make/print-target-list/rmake.rs b/tests/run-make/print-target-list/rmake.rs index 04ef8440104f6..35af019d569a6 100644 --- a/tests/run-make/print-target-list/rmake.rs +++ b/tests/run-make/print-target-list/rmake.rs @@ -5,6 +5,7 @@ //@ needs-llvm-components: aarch64 arm avr bpf csky hexagon loongarch m68k mips msp430 nvptx powerpc riscv sparc systemz webassembly x86 // FIXME(jieyouxu): there has to be a better way to do this, without the needs-llvm-components it // will fail on LLVM built without all of the components listed above. +//@ ignore-backends: gcc use run_make_support::bare_rustc; diff --git a/tests/run-make/print-to-output/rmake.rs b/tests/run-make/print-to-output/rmake.rs index a85ab5e23b080..6baa03e6fa3fc 100644 --- a/tests/run-make/print-to-output/rmake.rs +++ b/tests/run-make/print-to-output/rmake.rs @@ -6,6 +6,7 @@ // will fail on LLVM built without all of the components listed above. If adding a new target that // relies on a llvm component not listed above, it will need to be added to the required llvm // components above. +//@ ignore-backends: gcc use std::path::PathBuf; diff --git a/tests/run-make/reachable-extern-fn-available-lto/rmake.rs b/tests/run-make/reachable-extern-fn-available-lto/rmake.rs index 558444846fd1d..d0c203fba96db 100644 --- a/tests/run-make/reachable-extern-fn-available-lto/rmake.rs +++ b/tests/run-make/reachable-extern-fn-available-lto/rmake.rs @@ -8,6 +8,8 @@ // See https://github.com/rust-lang/rust/issues/14500 //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{cc, extra_c_flags, run, rustc, static_lib_name}; diff --git a/tests/run-make/remap-path-prefix-dwarf/rmake.rs b/tests/run-make/remap-path-prefix-dwarf/rmake.rs index ab6c1fb70d682..ad2f5431c58f4 100644 --- a/tests/run-make/remap-path-prefix-dwarf/rmake.rs +++ b/tests/run-make/remap-path-prefix-dwarf/rmake.rs @@ -7,6 +7,8 @@ //@ needs-target-std //@ ignore-windows // Reason: the remap path prefix is not printed in the dwarf dump. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{cwd, is_darwin, llvm_dwarfdump, rust_lib_name, rustc}; diff --git a/tests/run-make/repr128-dwarf/rmake.rs b/tests/run-make/repr128-dwarf/rmake.rs index 6b381f1f10bf4..7a8de3b54521e 100644 --- a/tests/run-make/repr128-dwarf/rmake.rs +++ b/tests/run-make/repr128-dwarf/rmake.rs @@ -1,6 +1,9 @@ //@ ignore-cross-compile //@ ignore-wasm (`object` can't handle wasm object files) //@ ignore-windows +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + // This test should be replaced with one in tests/debuginfo once GDB or LLDB support 128-bit enums. use std::collections::HashMap; diff --git a/tests/run-make/reproducible-build-2/rmake.rs b/tests/run-make/reproducible-build-2/rmake.rs index 1de5ca1e6f7fb..7219f55111ae9 100644 --- a/tests/run-make/reproducible-build-2/rmake.rs +++ b/tests/run-make/reproducible-build-2/rmake.rs @@ -11,6 +11,9 @@ //@ ignore-windows-gnu // GNU Linker for Windows is non-deterministic. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{bin_name, is_windows_msvc, rfs, rust_lib_name, rustc}; fn main() { diff --git a/tests/run-make/reproducible-build/rmake.rs b/tests/run-make/reproducible-build/rmake.rs index 993c2c8092a6b..3a38fc45e93de 100644 --- a/tests/run-make/reproducible-build/rmake.rs +++ b/tests/run-make/reproducible-build/rmake.rs @@ -21,6 +21,8 @@ // Tracking Issue: https://github.com/rust-lang/rust/issues/129080 //@ ignore-cross-compile (linker binary needs to run) +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{ bin_name, cwd, diff, is_darwin, is_windows, regex, rfs, run_in_tmpdir, rust_lib_name, rustc, diff --git a/tests/run-make/requires-consistent-cpu-no-native/rmake.rs b/tests/run-make/requires-consistent-cpu-no-native/rmake.rs index 6fdb68dd513e2..f9377ca63b324 100644 --- a/tests/run-make/requires-consistent-cpu-no-native/rmake.rs +++ b/tests/run-make/requires-consistent-cpu-no-native/rmake.rs @@ -10,6 +10,9 @@ // Finally, the test verifies that `-Ctarget-cpu=native` is rejected when using // the second custom target. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use std::fs; use run_make_support::*; diff --git a/tests/run-make/rustc-help/rmake.rs b/tests/run-make/rustc-help/rmake.rs index 84f8c1b59b629..c01f4df1e87c0 100644 --- a/tests/run-make/rustc-help/rmake.rs +++ b/tests/run-make/rustc-help/rmake.rs @@ -1,5 +1,8 @@ // Tests `rustc --help` and similar invocations against snapshots and each other. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{bare_rustc, diff, similar}; fn main() { diff --git a/tests/run-make/rustdoc/flag-namespaces-from-rustc/rmake.rs b/tests/run-make/rustdoc/flag-namespaces-from-rustc/rmake.rs index 4adb5b5a2eb34..79b91288107b9 100644 --- a/tests/run-make/rustdoc/flag-namespaces-from-rustc/rmake.rs +++ b/tests/run-make/rustdoc/flag-namespaces-from-rustc/rmake.rs @@ -1,3 +1,6 @@ +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{Diff, rustc, rustdoc}; fn compare_outputs(args: &[&str]) { diff --git a/tests/run-make/rustdoc/target-modifiers/rmake.rs b/tests/run-make/rustdoc/target-modifiers/rmake.rs index ffe87f3f7650e..096d1ebea3b5d 100644 --- a/tests/run-make/rustdoc/target-modifiers/rmake.rs +++ b/tests/run-make/rustdoc/target-modifiers/rmake.rs @@ -5,6 +5,9 @@ //! //! Please see https://github.com/rust-lang/rust/issues/144521. +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{rustc, rustdoc}; fn main() { diff --git a/tests/run-make/sanitizer-cdylib-link/rmake.rs b/tests/run-make/sanitizer-cdylib-link/rmake.rs index 8ff58594d109a..385f61938eb54 100644 --- a/tests/run-make/sanitizer-cdylib-link/rmake.rs +++ b/tests/run-make/sanitizer-cdylib-link/rmake.rs @@ -7,6 +7,8 @@ //@ needs-sanitizer-support //@ needs-sanitizer-address +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc //@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer diff --git a/tests/run-make/sanitizer-dylib-link/rmake.rs b/tests/run-make/sanitizer-dylib-link/rmake.rs index bae3240a23648..1d66325899bd8 100644 --- a/tests/run-make/sanitizer-dylib-link/rmake.rs +++ b/tests/run-make/sanitizer-dylib-link/rmake.rs @@ -6,6 +6,8 @@ //@ needs-sanitizer-support //@ needs-sanitizer-address +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc //@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer diff --git a/tests/run-make/sanitizer-staticlib-link/rmake.rs b/tests/run-make/sanitizer-staticlib-link/rmake.rs index dda9262618903..85495fe116538 100644 --- a/tests/run-make/sanitizer-staticlib-link/rmake.rs +++ b/tests/run-make/sanitizer-staticlib-link/rmake.rs @@ -10,6 +10,8 @@ //@ needs-sanitizer-support //@ needs-sanitizer-address +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc //@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer diff --git a/tests/run-make/simd-ffi/rmake.rs b/tests/run-make/simd-ffi/rmake.rs index 054ea402a698d..f6f308df7ccbc 100644 --- a/tests/run-make/simd-ffi/rmake.rs +++ b/tests/run-make/simd-ffi/rmake.rs @@ -5,6 +5,9 @@ // Note that this test does not check linking or binary execution. // See https://github.com/rust-lang/rust/pull/21233 +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use run_make_support::{llvm_components_contain, rustc}; fn main() { diff --git a/tests/run-make/split-debuginfo/rmake.rs b/tests/run-make/split-debuginfo/rmake.rs index 9f06c8c06a77a..484c194fb0ef2 100644 --- a/tests/run-make/split-debuginfo/rmake.rs +++ b/tests/run-make/split-debuginfo/rmake.rs @@ -55,6 +55,9 @@ // at all, and lumped windows-msvc and windows-gnu together at that. //@ ignore-windows-gnu +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + #![deny(warnings)] use std::collections::BTreeSet; diff --git a/tests/run-make/static-pie/rmake.rs b/tests/run-make/static-pie/rmake.rs index cb24c0495be8f..371fc0276b323 100644 --- a/tests/run-make/static-pie/rmake.rs +++ b/tests/run-make/static-pie/rmake.rs @@ -4,6 +4,8 @@ //@ only-x86_64 //@ only-linux //@ ignore-32bit +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use std::process::Command; diff --git a/tests/run-make/target-cpu-precedence/rmake.rs b/tests/run-make/target-cpu-precedence/rmake.rs index 13dfcd72e3891..fc7ff174f926c 100644 --- a/tests/run-make/target-cpu-precedence/rmake.rs +++ b/tests/run-make/target-cpu-precedence/rmake.rs @@ -2,6 +2,7 @@ // the last value is used both for the corresponding target modifier in the // crate metadata and for the target CPU recorded in the LLVM IR. //@ needs-llvm-components: nvptx +//@ ignore-backends: gcc use run_make_support::*; diff --git a/tests/run-make/target-specs/rmake.rs b/tests/run-make/target-specs/rmake.rs index 6c88f3164e9e4..2bed5194144b9 100644 --- a/tests/run-make/target-specs/rmake.rs +++ b/tests/run-make/target-specs/rmake.rs @@ -5,6 +5,7 @@ // using them correctly, or fails with the right error message when using them improperly. // See https://github.com/rust-lang/rust/pull/16156 //@ needs-llvm-components: x86 +//@ ignore-backends: gcc use run_make_support::{diff, rfs, rustc}; diff --git a/tests/run-make/target-without-atomic-cas/rmake.rs b/tests/run-make/target-without-atomic-cas/rmake.rs index e6c86c0c21d96..0ae2658372689 100644 --- a/tests/run-make/target-without-atomic-cas/rmake.rs +++ b/tests/run-make/target-without-atomic-cas/rmake.rs @@ -5,6 +5,8 @@ // ignore-tidy-linelength //@ needs-llvm-components: arm +//@ ignore-backends: gcc + // Note: without the needs-llvm-components it will fail on LLVM built without all of the components // listed above. If any new targets are added, please double-check their respective llvm components // are specified above. diff --git a/tests/run-make/thumb-interworking/rmake.rs b/tests/run-make/thumb-interworking/rmake.rs index 05ff73c78efb1..6ec7f4d4680ce 100644 --- a/tests/run-make/thumb-interworking/rmake.rs +++ b/tests/run-make/thumb-interworking/rmake.rs @@ -1,5 +1,7 @@ //@ needs-llvm-components: arm //@ needs-rust-lld +//@ ignore-backends: gcc + use run_make_support::{ llvm_filecheck, llvm_objdump, path, rfs, run, rustc, rustc_minicore, source_root, }; diff --git a/tests/run-make/track-pgo-dep-info/rmake.rs b/tests/run-make/track-pgo-dep-info/rmake.rs index 5869dbf9c2419..a1b30006efcd3 100644 --- a/tests/run-make/track-pgo-dep-info/rmake.rs +++ b/tests/run-make/track-pgo-dep-info/rmake.rs @@ -7,6 +7,8 @@ //@ ignore-cross-compile // Reason: the binary is executed //@ needs-profiler-runtime +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{llvm_profdata, rfs, run, rustc}; diff --git a/tests/run-make/used-proc-macro/rmake.rs b/tests/run-make/used-proc-macro/rmake.rs index 58b2760e64dbb..e92a0a60bd6e4 100644 --- a/tests/run-make/used-proc-macro/rmake.rs +++ b/tests/run-make/used-proc-macro/rmake.rs @@ -4,6 +4,8 @@ //@ ignore-windows llvm-readobj --all doesn't show local symbols on Windows //@ needs-crate-type: proc-macro //@ ignore-musl (FIXME: can't find `-lunwind`) +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{dynamic_lib_name, llvm_readobj, rustc}; diff --git a/tests/run-make/volatile-intrinsics/rmake.rs b/tests/run-make/volatile-intrinsics/rmake.rs index 1d19b65214337..6863e29897405 100644 --- a/tests/run-make/volatile-intrinsics/rmake.rs +++ b/tests/run-make/volatile-intrinsics/rmake.rs @@ -1,4 +1,6 @@ //@ ignore-cross-compile +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc use run_make_support::{assert_contains, rfs, run, rustc}; diff --git a/tests/run-make/wasm-unexpected-features/rmake.rs b/tests/run-make/wasm-unexpected-features/rmake.rs index ffff64f1a876f..890802b3d7680 100644 --- a/tests/run-make/wasm-unexpected-features/rmake.rs +++ b/tests/run-make/wasm-unexpected-features/rmake.rs @@ -1,4 +1,7 @@ //@ needs-rust-lld +// FIXME: Once GCC backend is fixed, remove this `ignore-backends`. +//@ ignore-backends: gcc + use std::path::Path; use run_make_support::{path, rfs, rustc, rustc_minicore, wasmparser}; diff --git a/tests/ui/inference/need_type_info/auxiliary/derive-attribute-annotation-needed.rs b/tests/ui/inference/need_type_info/auxiliary/derive-attribute-annotation-needed.rs new file mode 100644 index 0000000000000..27f5a4c1f2475 --- /dev/null +++ b/tests/ui/inference/need_type_info/auxiliary/derive-attribute-annotation-needed.rs @@ -0,0 +1,36 @@ +//@ edition: 2018 +#![feature(proc_macro_quote)] +use proc_macro::{TokenStream, Ident, TokenTree, quote}; + +#[proc_macro_derive(Serialize, attributes(serde))] +pub fn serialize(input: TokenStream) -> TokenStream { + assert_eq!( + input.to_string(), + "pub struct Matrix { #[serde(serialize_with = \"f\")] matrix: (), }" + ); + + let TokenTree::Group(group) = input.into_iter().last().unwrap() else { + panic!("unexpected group"); + }; + + let TokenTree::Group(group) = group.stream().into_iter().nth(1).unwrap() else { + panic!("expected group"); + }; + + let TokenTree::Group(group) = group.stream().into_iter().nth(1).unwrap() else { + panic!("expected group"); + }; + + let TokenTree::Literal(lit) = group.stream().into_iter().nth(2).unwrap() else { + panic!("expected literal"); + }; + + let ident = Ident::new("f", lit.span()); + + quote! { + fn serialize() { + $ident(); + } + } + .into() +} diff --git a/tests/ui/inference/need_type_info/derive-attribute-annotation-needed.rs b/tests/ui/inference/need_type_info/derive-attribute-annotation-needed.rs new file mode 100644 index 0000000000000..1ac00dbcbd4b1 --- /dev/null +++ b/tests/ui/inference/need_type_info/derive-attribute-annotation-needed.rs @@ -0,0 +1,20 @@ +//@ proc-macro: derive-attribute-annotation-needed.rs +//@ edition: 2018 + + +use derive_attribute_annotation_needed::Serialize; + +fn f() {} + +#[derive(Serialize)] +pub struct Matrix { + #[serde(serialize_with = "f")] + //~^ ERROR type annotations needed + matrix: (), +} + +fn main() { + f(); + //~^ ERROR type annotations needed + //~| HELP consider specifying a concrete type for the type parameter `T` +} diff --git a/tests/ui/inference/need_type_info/derive-attribute-annotation-needed.stderr b/tests/ui/inference/need_type_info/derive-attribute-annotation-needed.stderr new file mode 100644 index 0000000000000..ebffce7148672 --- /dev/null +++ b/tests/ui/inference/need_type_info/derive-attribute-annotation-needed.stderr @@ -0,0 +1,20 @@ +error[E0282]: type annotations needed + --> $DIR/derive-attribute-annotation-needed.rs:11:30 + | +LL | #[serde(serialize_with = "f")] + | ^^^ cannot infer type of the type parameter `T` declared on the function `f` + +error[E0282]: type annotations needed + --> $DIR/derive-attribute-annotation-needed.rs:17:5 + | +LL | f(); + | ^ cannot infer type of the type parameter `T` declared on the function `f` + | +help: consider specifying a concrete type for the type parameter `T` + | +LL | f::(); + | ++++++++++++++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/name/mod.rs b/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/name/mod.rs new file mode 100644 index 0000000000000..4e86c23ab8521 --- /dev/null +++ b/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/name/mod.rs @@ -0,0 +1,7 @@ +//@ ignore-auxiliary + +// DON'T remove this attribute, it is used to trigger re-collection +// See more info: +#![deny(unsafe_code)] + +mod name; diff --git a/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/name/name/mod.rs b/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/name/name/mod.rs new file mode 100644 index 0000000000000..cb924172efeac --- /dev/null +++ b/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/name/name/mod.rs @@ -0,0 +1 @@ +//@ ignore-auxiliary diff --git a/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/path-attr-inner-attr-nested-mod-rs.rs b/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/path-attr-inner-attr-nested-mod-rs.rs new file mode 100644 index 0000000000000..8e186b111dbb7 --- /dev/null +++ b/tests/ui/modules/path-attr-inner-attr-nested-mod-rs/path-attr-inner-attr-nested-mod-rs.rs @@ -0,0 +1,7 @@ +//! Regression test for +//@ check-pass + +#[path = "name/mod.rs"] +mod name; + +fn main() {} diff --git a/triagebot.toml b/triagebot.toml index 8abfb53e7fa74..84a2c4d8af722 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -1518,6 +1518,19 @@ cc = ["@ZuseZ4"] [mentions."compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs"] cc = ["@ZuseZ4"] +[mentions."compiler/rustc_target/src/asm/amdgpu.rs"] +cc = ["@Flakebi"] +[mentions."compiler/rustc_target/src/callconv/amdgpu.rs"] +cc = ["@Flakebi"] +[mentions."compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs"] +cc = ["@Flakebi"] +[mentions."library/stdarch/crates/core_arch/src/amdgpu"] +cc = ["@Flakebi"] +[mentions."src/doc/rustc/src/platform-support/amdgcn-amd-amdhsa.md"] +cc = ["@Flakebi"] +[mentions."library/core/src/intrinsics/gpu.rs"] +cc = ["@Flakebi"] + [mentions."library/core/src/fmt/rt.rs"] cc = ["@m-ou-se"] [mentions."compiler/rustc_ast_lowering/src/format.rs"]