about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_attr_parsing/src/attributes/debugger.rs60
-rw-r--r--compiler/rustc_attr_parsing/src/attributes/mod.rs1
-rw-r--r--compiler/rustc_attr_parsing/src/context.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/abi.rs8
-rw-r--r--compiler/rustc_codegen_llvm/src/allocator.rs25
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs191
-rw-r--r--compiler/rustc_codegen_llvm/src/base.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs10
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/declare.rs2
-rw-r--r--compiler/rustc_codegen_ssa/src/base.rs4
-rw-r--r--compiler/rustc_expand/src/base.rs23
-rw-r--r--compiler/rustc_expand/src/expand.rs2
-rw-r--r--compiler/rustc_expand/src/mbe/macro_rules.rs28
-rw-r--r--compiler/rustc_hir/src/attrs/data_structures.rs19
-rw-r--r--compiler/rustc_hir/src/attrs/encode_cross_crate.rs1
-rw-r--r--compiler/rustc_macros/src/query.rs2
-rw-r--r--compiler/rustc_middle/src/middle/debugger_visualizer.rs8
-rw-r--r--compiler/rustc_mir_build/src/builder/mod.rs6
-rw-r--r--compiler/rustc_passes/messages.ftl9
-rw-r--r--compiler/rustc_passes/src/check_attr.rs16
-rw-r--r--compiler/rustc_passes/src/debugger_visualizer.rs113
-rw-r--r--compiler/rustc_passes/src/errors.rs17
-rw-r--r--compiler/rustc_privacy/src/lib.rs22
-rw-r--r--compiler/rustc_resolve/src/ident.rs11
-rw-r--r--compiler/rustc_target/src/spec/base/windows_gnu.rs3
-rw-r--r--compiler/rustc_target/src/spec/crt_objects.rs17
-rw-r--r--compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs2
-rw-r--r--compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs2
-rw-r--r--compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs8
-rw-r--r--library/alloctests/tests/lib.rs1
-rw-r--r--library/std/src/sys/pal/unix/stack_overflow.rs2
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs2
-rw-r--r--src/doc/rustc/src/platform-support.md4
-rw-r--r--src/doc/rustc/src/platform-support/armebv7r-none-eabi.md2
-rw-r--r--src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md2
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs2
-rw-r--r--src/tools/clippy/tests/ui/useless_attribute.fixed2
-rw-r--r--src/tools/clippy/tests/ui/useless_attribute.rs2
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/src/builtin/derive_macro.rs2
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/src/builtin/fn_macro.rs2
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/src/builtin/quote.rs2
-rw-r--r--src/tools/rustfmt/src/config/mod.rs1
-rw-r--r--tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs21
-rw-r--r--tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr39
-rw-r--r--tests/rustdoc-ui/intra-doc/type-alias-primitive.rs14
-rw-r--r--tests/rustdoc/intra-doc/type-alias-primitive.rs21
-rw-r--r--tests/ui/array-slice-vec/box-of-array-of-drop-1.rs1
-rw-r--r--tests/ui/array-slice-vec/box-of-array-of-drop-2.rs1
-rw-r--r--tests/ui/array-slice-vec/nested-vec-3.rs1
-rw-r--r--tests/ui/array-slice-vec/slice-panic-1.rs1
-rw-r--r--tests/ui/array-slice-vec/slice-panic-2.rs1
-rw-r--r--tests/ui/asm/global-asm-isnt-really-a-mir-body.rs1
-rw-r--r--tests/ui/asm/x86_64/goto.rs1
-rw-r--r--tests/ui/asm/x86_64/goto.stderr4
-rw-r--r--tests/ui/asm/x86_64/srcloc.rs1
-rw-r--r--tests/ui/asm/x86_64/srcloc.stderr50
-rw-r--r--tests/ui/attributes/fn-align-dyn.rs1
-rw-r--r--tests/ui/attributes/main-removed-2/main.rs1
-rw-r--r--tests/ui/attributes/malformed-attrs.rs3
-rw-r--r--tests/ui/attributes/malformed-attrs.stderr53
-rw-r--r--tests/ui/backtrace/synchronized-panic-handler.rs1
-rw-r--r--tests/ui/backtrace/synchronized-panic-handler.run.stderr4
-rw-r--r--tests/ui/box/unit/unwind-unique.rs1
-rw-r--r--tests/ui/c-variadic/inherent-method.rs1
-rw-r--r--tests/ui/c-variadic/trait-method.rs1
-rw-r--r--tests/ui/c-variadic/valid.rs1
-rw-r--r--tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs1
-rw-r--r--tests/ui/codegen/issue-82833-slice-miscompile.rs1
-rw-r--r--tests/ui/codegen/llvm-args-invalid-flag.rs1
-rw-r--r--tests/ui/codegen/remark-flag-functionality.rs1
-rw-r--r--tests/ui/codegen/virtual-function-elimination.rs1
-rw-r--r--tests/ui/coroutine/gen_block_panic.rs1
-rw-r--r--tests/ui/coroutine/gen_block_panic.stderr2
-rw-r--r--tests/ui/delegation/fn-header-variadic.rs1
-rw-r--r--tests/ui/delegation/fn-header-variadic.stderr4
-rw-r--r--tests/ui/drop/drop-trait-enum.rs1
-rw-r--r--tests/ui/drop/terminate-in-initializer.rs1
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller.rs1
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs1
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/drop-order.rs1
-rw-r--r--tests/ui/explicit-tail-calls/indexer.rs1
-rw-r--r--tests/ui/explicit-tail-calls/recursion-etc.rs1
-rw-r--r--tests/ui/extern/extern-types-field-offset.rs1
-rw-r--r--tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs1
-rw-r--r--tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs1
-rw-r--r--tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs1
-rw-r--r--tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr2
-rw-r--r--tests/ui/frontmatter/proc-macro-observer.rs1
-rw-r--r--tests/ui/hygiene/issue-77523-def-site-async-await.rs1
-rw-r--r--tests/ui/impl-trait/precise-capturing/external-macro.rs1
-rw-r--r--tests/ui/invalid-compile-flags/invalid-llvm-passes.rs1
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-option.rs2
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-option.stderr22
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.rs3
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.stderr4
-rw-r--r--tests/ui/issues/issue-25089.rs1
-rw-r--r--tests/ui/issues/issue-26655.rs1
-rw-r--r--tests/ui/issues/issue-29485.rs1
-rw-r--r--tests/ui/issues/issue-30018-panic.rs1
-rw-r--r--tests/ui/issues/issue-44056.rs1
-rw-r--r--tests/ui/issues/issue-68696-catch-during-unwind.rs1
-rw-r--r--tests/ui/linkage-attr/common-linkage-non-zero-init.rs1
-rw-r--r--tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs1
-rw-r--r--tests/ui/linking/no-gc-encapsulation-symbols.rs1
-rw-r--r--tests/ui/lint/unused-qualification-in-derive-expansion.rs1
-rw-r--r--tests/ui/lto/debuginfo-lto-alloc.rs1
-rw-r--r--tests/ui/lto/debuginfo-lto.rs1
-rw-r--r--tests/ui/lto/dwarf-mixed-versions-lto.rs1
-rw-r--r--tests/ui/lto/fat-lto.rs1
-rw-r--r--tests/ui/lto/issue-100772.rs1
-rw-r--r--tests/ui/lto/lto-duplicate-symbols.rs1
-rw-r--r--tests/ui/lto/lto-many-codegen-units.rs1
-rw-r--r--tests/ui/lto/lto-rustc-loads-linker-plugin.rs1
-rw-r--r--tests/ui/lto/lto-still-runs-thread-dtors.rs1
-rw-r--r--tests/ui/macros/same-sequence-span.rs1
-rw-r--r--tests/ui/macros/same-sequence-span.stderr12
-rw-r--r--tests/ui/numbers-arithmetic/int-abs-overflow.rs1
-rw-r--r--tests/ui/numbers-arithmetic/issue-8460.rs1
-rw-r--r--tests/ui/panic-runtime/lto-unwind.rs1
-rw-r--r--tests/ui/panics/oom-panic-unwind.rs1
-rw-r--r--tests/ui/panics/panic-handler-chain-update-hook.rs1
-rw-r--r--tests/ui/panics/panic-handler-chain.rs1
-rw-r--r--tests/ui/panics/panic-handler-flail-wildly.rs1
-rw-r--r--tests/ui/panics/panic-handler-set-twice.rs1
-rw-r--r--tests/ui/panics/panic-in-dtor-drops-fields.rs1
-rw-r--r--tests/ui/panics/panic-recover-propagate.rs1
-rw-r--r--tests/ui/panics/rvalue-cleanup-during-box-panic.rs1
-rw-r--r--tests/ui/panics/unwind-force-no-unwind-tables.rs1
-rw-r--r--tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs1
-rw-r--r--tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr2
-rw-r--r--tests/ui/parser/macro/unicode-control-codepoints-macros.rs1
-rw-r--r--tests/ui/parser/macro/unicode-control-codepoints-macros.stderr10
-rw-r--r--tests/ui/parser/tuple-index-suffix-proc-macro.rs1
-rw-r--r--tests/ui/parser/tuple-index-suffix-proc-macro.stderr8
-rw-r--r--tests/ui/proc-macro/add-impl.rs1
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs1
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr2
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs.rs1
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs.stderr30
-rw-r--r--tests/ui/proc-macro/append-impl.rs1
-rw-r--r--tests/ui/proc-macro/attr-args.rs1
-rw-r--r--tests/ui/proc-macro/attr-invalid-exprs.rs1
-rw-r--r--tests/ui/proc-macro/attr-invalid-exprs.stderr6
-rw-r--r--tests/ui/proc-macro/attr-on-trait.rs1
-rw-r--r--tests/ui/proc-macro/bang-macro.rs1
-rw-r--r--tests/ui/proc-macro/call-site.rs1
-rw-r--r--tests/ui/proc-macro/count_compound_ops.rs1
-rw-r--r--tests/ui/proc-macro/derive-bad.rs1
-rw-r--r--tests/ui/proc-macro/derive-bad.stderr6
-rw-r--r--tests/ui/proc-macro/derive-helper-shadowing.rs1
-rw-r--r--tests/ui/proc-macro/derive-helper-shadowing.stderr18
-rw-r--r--tests/ui/proc-macro/derive-same-struct.rs1
-rw-r--r--tests/ui/proc-macro/edition-imports-2018.rs1
-rw-r--r--tests/ui/proc-macro/env.rs1
-rw-r--r--tests/ui/proc-macro/expand-expr.rs3
-rw-r--r--tests/ui/proc-macro/expand-expr.stderr14
-rw-r--r--tests/ui/proc-macro/expand-to-unstable.rs1
-rw-r--r--tests/ui/proc-macro/expand-to-unstable.stderr2
-rw-r--r--tests/ui/proc-macro/expand-with-a-macro.rs1
-rw-r--r--tests/ui/proc-macro/gen-macro-rules-hygiene.rs1
-rw-r--r--tests/ui/proc-macro/gen-macro-rules-hygiene.stderr6
-rw-r--r--tests/ui/proc-macro/gen-macro-rules.rs1
-rw-r--r--tests/ui/proc-macro/generate-mod.rs1
-rw-r--r--tests/ui/proc-macro/generate-mod.stderr28
-rw-r--r--tests/ui/proc-macro/hygiene_example.rs1
-rw-r--r--tests/ui/proc-macro/is-available.rs1
-rw-r--r--tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs1
-rw-r--r--tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr18
-rw-r--r--tests/ui/proc-macro/issue-107113-wrap.rs1
-rw-r--r--tests/ui/proc-macro/issue-107113-wrap.stderr2
-rw-r--r--tests/ui/proc-macro/issue-118809.rs1
-rw-r--r--tests/ui/proc-macro/issue-118809.stderr4
-rw-r--r--tests/ui/proc-macro/issue-38586.rs1
-rw-r--r--tests/ui/proc-macro/issue-38586.stderr2
-rw-r--r--tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs1
-rw-r--r--tests/ui/proc-macro/issue-79148.rs1
-rw-r--r--tests/ui/proc-macro/issue-79148.stderr4
-rw-r--r--tests/ui/proc-macro/issue-83510.rs1
-rw-r--r--tests/ui/proc-macro/issue-83510.stderr8
-rw-r--r--tests/ui/proc-macro/issue-91800.rs1
-rw-r--r--tests/ui/proc-macro/issue-91800.stderr14
-rw-r--r--tests/ui/proc-macro/lifetimes-rpass.rs1
-rw-r--r--tests/ui/proc-macro/lints_in_proc_macros.rs1
-rw-r--r--tests/ui/proc-macro/lints_in_proc_macros.stderr2
-rw-r--r--tests/ui/proc-macro/load-two.rs1
-rw-r--r--tests/ui/proc-macro/macro-crate-multi-decorator.rs1
-rw-r--r--tests/ui/proc-macro/macro_rules_edition_from_pm.rs1
-rw-r--r--tests/ui/proc-macro/match-expander.rs1
-rw-r--r--tests/ui/proc-macro/match-expander.stderr2
-rw-r--r--tests/ui/proc-macro/mixed-site-span.rs1
-rw-r--r--tests/ui/proc-macro/mixed-site-span.stderr104
-rw-r--r--tests/ui/proc-macro/modify-ast.rs1
-rw-r--r--tests/ui/proc-macro/parent-source-spans.rs1
-rw-r--r--tests/ui/proc-macro/parent-source-spans.stderr42
-rw-r--r--tests/ui/proc-macro/quote/basic.rs1
-rw-r--r--tests/ui/proc-macro/span-api-tests.rs1
-rw-r--r--tests/ui/proc-macro/span-from-proc-macro.rs1
-rw-r--r--tests/ui/proc-macro/span-from-proc-macro.stderr8
-rw-r--r--tests/ui/proc-macro/weird-hygiene.rs1
-rw-r--r--tests/ui/proc-macro/weird-hygiene.stderr4
-rw-r--r--tests/ui/process/multi-panic.rs1
-rw-r--r--tests/ui/resolve/prelude-order.rs1
-rw-r--r--tests/ui/resolve/prelude-order.stderr10
-rw-r--r--tests/ui/resolve/unused-macro-import.rs13
-rw-r--r--tests/ui/resolve/unused-macro-import.stderr14
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs1
-rw-r--r--tests/ui/runtime/backtrace-debuginfo.rs1
-rw-r--r--tests/ui/runtime/out-of-stack.rs1
-rw-r--r--tests/ui/rust-2018/suggestions-not-always-applicable.fixed1
-rw-r--r--tests/ui/rust-2018/suggestions-not-always-applicable.rs1
-rw-r--r--tests/ui/rust-2021/reserved-prefixes-via-macro.rs1
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs1
-rw-r--r--tests/ui/sanitizer/cfi/transparent-has-regions.rs1
-rw-r--r--tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs1
-rw-r--r--tests/ui/sepcomp/sepcomp-lib-lto.rs1
-rw-r--r--tests/ui/sepcomp/sepcomp-unwind.rs1
-rw-r--r--tests/ui/simd/intrinsic/generic-arithmetic-2.rs1
-rw-r--r--tests/ui/simd/intrinsic/generic-arithmetic-2.stderr56
-rw-r--r--tests/ui/simd/intrinsic/generic-elements.rs1
-rw-r--r--tests/ui/simd/intrinsic/generic-elements.stderr42
-rw-r--r--tests/ui/simd/masked-load-store-build-fail.rs1
-rw-r--r--tests/ui/simd/masked-load-store-build-fail.stderr16
-rw-r--r--tests/ui/simd/monomorphize-shuffle-index.generic.stderr2
-rw-r--r--tests/ui/simd/monomorphize-shuffle-index.rs1
-rw-r--r--tests/ui/simd/not-out-of-bounds.rs1
-rw-r--r--tests/ui/simd/not-out-of-bounds.stderr18
-rw-r--r--tests/ui/structs-enums/unit-like-struct-drop-run.rs1
-rw-r--r--tests/ui/suggestions/issue-61963.rs1
-rw-r--r--tests/ui/suggestions/issue-61963.stderr6
-rw-r--r--tests/ui/suggestions/suggest-ref-macro.rs1
-rw-r--r--tests/ui/suggestions/suggest-ref-macro.stderr12
-rw-r--r--tests/ui/test-attrs/test-panic-while-printing.rs1
-rw-r--r--tests/ui/threads-sendsync/task-stderr.rs1
-rw-r--r--tests/ui/threads-sendsync/unwind-resource.rs1
-rw-r--r--tests/ui/traits/clone-unwind-rc-cleanup.rs1
-rw-r--r--tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs1
-rw-r--r--tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr2
242 files changed, 946 insertions, 644 deletions
diff --git a/compiler/rustc_attr_parsing/src/attributes/debugger.rs b/compiler/rustc_attr_parsing/src/attributes/debugger.rs
new file mode 100644
index 00000000000..56ff10be426
--- /dev/null
+++ b/compiler/rustc_attr_parsing/src/attributes/debugger.rs
@@ -0,0 +1,60 @@
+use rustc_hir::attrs::{DebugVisualizer, DebuggerVisualizerType};
+
+use super::prelude::*;
+
+pub(crate) struct DebuggerViualizerParser;
+
+impl<S: Stage> CombineAttributeParser<S> for DebuggerViualizerParser {
+    const PATH: &[Symbol] = &[sym::debugger_visualizer];
+    const ALLOWED_TARGETS: AllowedTargets =
+        AllowedTargets::AllowList(&[Allow(Target::Mod), Allow(Target::Crate)]);
+    const TEMPLATE: AttributeTemplate = template!(
+        List: &[r#"natvis_file = "...", gdb_script_file = "...""#],
+        "https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute"
+    );
+
+    type Item = DebugVisualizer;
+    const CONVERT: ConvertFn<Self::Item> = |v, _| AttributeKind::DebuggerVisualizer(v);
+
+    fn extend<'c>(
+        cx: &'c mut AcceptContext<'_, '_, S>,
+        args: &'c ArgParser<'_>,
+    ) -> impl IntoIterator<Item = Self::Item> + 'c {
+        let Some(l) = args.list() else {
+            cx.expected_list(args.span().unwrap_or(cx.attr_span));
+            return None;
+        };
+        let Some(single) = l.single() else {
+            cx.expected_single_argument(l.span);
+            return None;
+        };
+        let Some(mi) = single.meta_item() else {
+            cx.expected_name_value(single.span(), None);
+            return None;
+        };
+        let path = mi.path().word_sym();
+        let visualizer_type = match path {
+            Some(sym::natvis_file) => DebuggerVisualizerType::Natvis,
+            Some(sym::gdb_script_file) => DebuggerVisualizerType::GdbPrettyPrinter,
+            _ => {
+                cx.expected_specific_argument(
+                    mi.path().span(),
+                    &[sym::natvis_file, sym::gdb_script_file],
+                );
+                return None;
+            }
+        };
+
+        let Some(path) = mi.args().name_value() else {
+            cx.expected_name_value(single.span(), path);
+            return None;
+        };
+
+        let Some(path) = path.value_as_str() else {
+            cx.expected_string_literal(path.value_span, Some(path.value_as_lit()));
+            return None;
+        };
+
+        Some(DebugVisualizer { span: mi.span(), visualizer_type, path })
+    }
+}
diff --git a/compiler/rustc_attr_parsing/src/attributes/mod.rs b/compiler/rustc_attr_parsing/src/attributes/mod.rs
index 4ed13d239b9..8dbf4c0ef32 100644
--- a/compiler/rustc_attr_parsing/src/attributes/mod.rs
+++ b/compiler/rustc_attr_parsing/src/attributes/mod.rs
@@ -36,6 +36,7 @@ pub(crate) mod cfg_old;
 pub(crate) mod codegen_attrs;
 pub(crate) mod confusables;
 pub(crate) mod crate_level;
+pub(crate) mod debugger;
 pub(crate) mod deprecation;
 pub(crate) mod dummy;
 pub(crate) mod inline;
diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs
index de1ab5e9578..d7ccf3c7806 100644
--- a/compiler/rustc_attr_parsing/src/context.rs
+++ b/compiler/rustc_attr_parsing/src/context.rs
@@ -28,6 +28,7 @@ use crate::attributes::crate_level::{
     CrateNameParser, MoveSizeLimitParser, NoCoreParser, NoStdParser, PatternComplexityLimitParser,
     RecursionLimitParser, RustcCoherenceIsCoreParser, TypeLengthLimitParser,
 };
+use crate::attributes::debugger::DebuggerViualizerParser;
 use crate::attributes::deprecation::DeprecationParser;
 use crate::attributes::dummy::DummyParser;
 use crate::attributes::inline::{InlineParser, RustcForceInlineParser};
@@ -163,6 +164,7 @@ attribute_parsers!(
         // tidy-alphabetical-start
         Combine<AllowConstFnUnstableParser>,
         Combine<AllowInternalUnstableParser>,
+        Combine<DebuggerViualizerParser>,
         Combine<ForceTargetFeatureParser>,
         Combine<LinkParser>,
         Combine<ReprParser>,
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs
index 11be7041167..861227f7c2a 100644
--- a/compiler/rustc_codegen_llvm/src/abi.rs
+++ b/compiler/rustc_codegen_llvm/src/abi.rs
@@ -538,7 +538,13 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
 
         // If the declaration has an associated instance, compute extra attributes based on that.
         if let Some(instance) = instance {
-            llfn_attrs_from_instance(cx, llfn, instance);
+            llfn_attrs_from_instance(
+                cx,
+                cx.tcx,
+                llfn,
+                &cx.tcx.codegen_instance_attrs(instance.def),
+                Some(instance),
+            );
         }
     }
 
diff --git a/compiler/rustc_codegen_llvm/src/allocator.rs b/compiler/rustc_codegen_llvm/src/allocator.rs
index df3e49279d9..abd63120397 100644
--- a/compiler/rustc_codegen_llvm/src/allocator.rs
+++ b/compiler/rustc_codegen_llvm/src/allocator.rs
@@ -5,15 +5,16 @@ use rustc_ast::expand::allocator::{
 };
 use rustc_codegen_ssa::traits::BaseTypeCodegenMethods as _;
 use rustc_middle::bug;
+use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
 use rustc_middle::ty::TyCtxt;
 use rustc_session::config::{DebugInfo, OomStrategy};
 use rustc_symbol_mangling::mangle_internal_symbol;
-use smallvec::SmallVec;
 
+use crate::attributes::llfn_attrs_from_instance;
 use crate::builder::SBuilder;
 use crate::declare::declare_simple_fn;
 use crate::llvm::{self, FALSE, TRUE, Type, Value};
-use crate::{SimpleCx, attributes, debuginfo, llvm_util};
+use crate::{SimpleCx, attributes, debuginfo};
 
 pub(crate) unsafe fn codegen(
     tcx: TyCtxt<'_>,
@@ -149,18 +150,8 @@ fn create_wrapper_function(
         ty,
     );
 
-    let mut attrs = SmallVec::<[_; 2]>::new();
-
-    let target_cpu = llvm_util::target_cpu(tcx.sess);
-    let target_cpu_attr = llvm::CreateAttrStringValue(cx.llcx, "target-cpu", target_cpu);
-
-    let tune_cpu_attr = llvm_util::tune_cpu(tcx.sess)
-        .map(|tune_cpu| llvm::CreateAttrStringValue(cx.llcx, "tune-cpu", tune_cpu));
-
-    attrs.push(target_cpu_attr);
-    attrs.extend(tune_cpu_attr);
-
-    attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &attrs);
+    let attrs = CodegenFnAttrs::new();
+    llfn_attrs_from_instance(cx, tcx, llfn, &attrs, None);
 
     let no_return = if no_return {
         // -> ! DIFlagNoReturn
@@ -171,12 +162,6 @@ fn create_wrapper_function(
         None
     };
 
-    if tcx.sess.must_emit_unwind_tables() {
-        let uwtable =
-            attributes::uwtable_attr(cx.llcx, tcx.sess.opts.unstable_opts.use_sync_unwind);
-        attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &[uwtable]);
-    }
-
     let llbb = unsafe { llvm::LLVMAppendBasicBlockInContext(cx.llcx, llfn, c"entry".as_ptr()) };
     let mut bx = SBuilder::build(&cx, llbb);
 
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index dcf6b945497..8070ea0b3e9 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -1,20 +1,21 @@
 //! Set and unset common attributes on LLVM values.
-use rustc_codegen_ssa::traits::*;
 use rustc_hir::attrs::{InlineAttr, InstructionSetAttr, OptimizeAttr};
 use rustc_hir::def_id::DefId;
-use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, PatchableFunctionEntry};
+use rustc_middle::middle::codegen_fn_attrs::{
+    CodegenFnAttrFlags, CodegenFnAttrs, PatchableFunctionEntry,
+};
 use rustc_middle::ty::{self, TyCtxt};
 use rustc_session::config::{BranchProtection, FunctionReturn, OptLevel, PAuthKey, PacRet};
 use rustc_symbol_mangling::mangle_internal_symbol;
 use rustc_target::spec::{FramePointer, SanitizerSet, StackProbeType, StackProtector};
 use smallvec::SmallVec;
 
-use crate::context::CodegenCx;
+use crate::context::SimpleCx;
 use crate::errors::SanitizerMemtagRequiresMte;
 use crate::llvm::AttributePlace::Function;
 use crate::llvm::{self, AllocKindFlags, Attribute, AttributeKind, AttributePlace, MemoryEffects};
 use crate::value::Value;
-use crate::{attributes, llvm_util};
+use crate::{Session, attributes, llvm_util};
 
 pub(crate) fn apply_to_llfn(llfn: &Value, idx: AttributePlace, attrs: &[&Attribute]) {
     if !attrs.is_empty() {
@@ -30,18 +31,19 @@ pub(crate) fn apply_to_callsite(callsite: &Value, idx: AttributePlace, attrs: &[
 
 /// Get LLVM attribute for the provided inline heuristic.
 pub(crate) fn inline_attr<'ll, 'tcx>(
-    cx: &CodegenCx<'ll, 'tcx>,
+    cx: &SimpleCx<'ll>,
+    tcx: TyCtxt<'tcx>,
     instance: ty::Instance<'tcx>,
 ) -> Option<&'ll Attribute> {
     // `optnone` requires `noinline`
-    let codegen_fn_attrs = cx.tcx.codegen_fn_attrs(instance.def_id());
+    let codegen_fn_attrs = tcx.codegen_fn_attrs(instance.def_id());
     let inline = match (codegen_fn_attrs.inline, &codegen_fn_attrs.optimize) {
         (_, OptimizeAttr::DoNotOptimize) => InlineAttr::Never,
-        (InlineAttr::None, _) if instance.def.requires_inline(cx.tcx) => InlineAttr::Hint,
+        (InlineAttr::None, _) if instance.def.requires_inline(tcx) => InlineAttr::Hint,
         (inline, _) => inline,
     };
 
-    if !cx.tcx.sess.opts.unstable_opts.inline_llvm {
+    if !tcx.sess.opts.unstable_opts.inline_llvm {
         // disable LLVM inlining
         return Some(AttributeKind::NoInline.create_attr(cx.llcx));
     }
@@ -51,7 +53,7 @@ pub(crate) fn inline_attr<'ll, 'tcx>(
             Some(AttributeKind::AlwaysInline.create_attr(cx.llcx))
         }
         InlineAttr::Never => {
-            if cx.sess().target.arch != "amdgpu" {
+            if tcx.sess.target.arch != "amdgpu" {
                 Some(AttributeKind::NoInline.create_attr(cx.llcx))
             } else {
                 None
@@ -63,12 +65,13 @@ pub(crate) fn inline_attr<'ll, 'tcx>(
 
 #[inline]
 fn patchable_function_entry_attrs<'ll>(
-    cx: &CodegenCx<'ll, '_>,
+    cx: &SimpleCx<'ll>,
+    sess: &Session,
     attr: Option<PatchableFunctionEntry>,
 ) -> SmallVec<[&'ll Attribute; 2]> {
     let mut attrs = SmallVec::new();
     let patchable_spec = attr.unwrap_or_else(|| {
-        PatchableFunctionEntry::from_config(cx.tcx.sess.opts.unstable_opts.patchable_function_entry)
+        PatchableFunctionEntry::from_config(sess.opts.unstable_opts.patchable_function_entry)
     });
     let entry = patchable_spec.entry();
     let prefix = patchable_spec.prefix();
@@ -91,12 +94,13 @@ fn patchable_function_entry_attrs<'ll>(
 
 /// Get LLVM sanitize attributes.
 #[inline]
-pub(crate) fn sanitize_attrs<'ll>(
-    cx: &CodegenCx<'ll, '_>,
+pub(crate) fn sanitize_attrs<'ll, 'tcx>(
+    cx: &SimpleCx<'ll>,
+    tcx: TyCtxt<'tcx>,
     no_sanitize: SanitizerSet,
 ) -> SmallVec<[&'ll Attribute; 4]> {
     let mut attrs = SmallVec::new();
-    let enabled = cx.tcx.sess.opts.unstable_opts.sanitizer - no_sanitize;
+    let enabled = tcx.sess.opts.unstable_opts.sanitizer - no_sanitize;
     if enabled.contains(SanitizerSet::ADDRESS) || enabled.contains(SanitizerSet::KERNELADDRESS) {
         attrs.push(llvm::AttributeKind::SanitizeAddress.create_attr(cx.llcx));
     }
@@ -114,11 +118,11 @@ pub(crate) fn sanitize_attrs<'ll>(
     }
     if enabled.contains(SanitizerSet::MEMTAG) {
         // Check to make sure the mte target feature is actually enabled.
-        let features = cx.tcx.global_backend_features(());
+        let features = tcx.global_backend_features(());
         let mte_feature =
             features.iter().map(|s| &s[..]).rfind(|n| ["+mte", "-mte"].contains(&&n[..]));
         if let None | Some("-mte") = mte_feature {
-            cx.tcx.dcx().emit_err(SanitizerMemtagRequiresMte);
+            tcx.dcx().emit_err(SanitizerMemtagRequiresMte);
         }
 
         attrs.push(llvm::AttributeKind::SanitizeMemTag.create_attr(cx.llcx));
@@ -139,9 +143,12 @@ pub(crate) fn uwtable_attr(llcx: &llvm::Context, use_sync_unwind: Option<bool>)
     llvm::CreateUWTableAttr(llcx, async_unwind)
 }
 
-pub(crate) fn frame_pointer_type_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
-    let mut fp = cx.sess().target.frame_pointer;
-    let opts = &cx.sess().opts;
+pub(crate) fn frame_pointer_type_attr<'ll>(
+    cx: &SimpleCx<'ll>,
+    sess: &Session,
+) -> Option<&'ll Attribute> {
+    let mut fp = sess.target.frame_pointer;
+    let opts = &sess.opts;
     // "mcount" function relies on stack pointer.
     // See <https://sourceware.org/binutils/docs/gprof/Implementation.html>.
     if opts.unstable_opts.instrument_mcount {
@@ -156,8 +163,8 @@ pub(crate) fn frame_pointer_type_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'
     Some(llvm::CreateAttrStringValue(cx.llcx, "frame-pointer", attr_value))
 }
 
-fn function_return_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
-    let function_return_attr = match cx.sess().opts.unstable_opts.function_return {
+fn function_return_attr<'ll>(cx: &SimpleCx<'ll>, sess: &Session) -> Option<&'ll Attribute> {
+    let function_return_attr = match sess.opts.unstable_opts.function_return {
         FunctionReturn::Keep => return None,
         FunctionReturn::ThunkExtern => AttributeKind::FnRetThunkExtern,
     };
@@ -167,17 +174,20 @@ fn function_return_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute>
 
 /// Tell LLVM what instrument function to insert.
 #[inline]
-fn instrument_function_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> SmallVec<[&'ll Attribute; 4]> {
+fn instrument_function_attr<'ll>(
+    cx: &SimpleCx<'ll>,
+    sess: &Session,
+) -> SmallVec<[&'ll Attribute; 4]> {
     let mut attrs = SmallVec::new();
-    if cx.sess().opts.unstable_opts.instrument_mcount {
+    if sess.opts.unstable_opts.instrument_mcount {
         // Similar to `clang -pg` behavior. Handled by the
         // `post-inline-ee-instrument` LLVM pass.
 
         // The function name varies on platforms.
         // See test/CodeGen/mcount.c in clang.
-        let mcount_name = match &cx.sess().target.llvm_mcount_intrinsic {
+        let mcount_name = match &sess.target.llvm_mcount_intrinsic {
             Some(llvm_mcount_intrinsic) => llvm_mcount_intrinsic.as_ref(),
-            None => cx.sess().target.mcount.as_ref(),
+            None => sess.target.mcount.as_ref(),
         };
 
         attrs.push(llvm::CreateAttrStringValue(
@@ -186,7 +196,7 @@ fn instrument_function_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> SmallVec<[&'ll Attr
             mcount_name,
         ));
     }
-    if let Some(options) = &cx.sess().opts.unstable_opts.instrument_xray {
+    if let Some(options) = &sess.opts.unstable_opts.instrument_xray {
         // XRay instrumentation is similar to __cyg_profile_func_{enter,exit}.
         // Function prologue and epilogue are instrumented with NOP sleds,
         // a runtime library later replaces them with detours into tracing code.
@@ -217,20 +227,20 @@ fn instrument_function_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> SmallVec<[&'ll Attr
     attrs
 }
 
-fn nojumptables_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
-    if !cx.sess().opts.unstable_opts.no_jump_tables {
+fn nojumptables_attr<'ll>(cx: &SimpleCx<'ll>, sess: &Session) -> Option<&'ll Attribute> {
+    if !sess.opts.unstable_opts.no_jump_tables {
         return None;
     }
 
     Some(llvm::CreateAttrStringValue(cx.llcx, "no-jump-tables", "true"))
 }
 
-fn probestack_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
+fn probestack_attr<'ll, 'tcx>(cx: &SimpleCx<'ll>, tcx: TyCtxt<'tcx>) -> Option<&'ll Attribute> {
     // Currently stack probes seem somewhat incompatible with the address
     // sanitizer and thread sanitizer. With asan we're already protected from
     // stack overflow anyway so we don't really need stack probes regardless.
-    if cx
-        .sess()
+    if tcx
+        .sess
         .opts
         .unstable_opts
         .sanitizer
@@ -240,22 +250,22 @@ fn probestack_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
     }
 
     // probestack doesn't play nice either with `-C profile-generate`.
-    if cx.sess().opts.cg.profile_generate.enabled() {
+    if tcx.sess.opts.cg.profile_generate.enabled() {
         return None;
     }
 
-    let attr_value = match cx.sess().target.stack_probes {
+    let attr_value = match tcx.sess.target.stack_probes {
         StackProbeType::None => return None,
         // Request LLVM to generate the probes inline. If the given LLVM version does not support
         // this, no probe is generated at all (even if the attribute is specified).
         StackProbeType::Inline => "inline-asm",
         // Flag our internal `__rust_probestack` function as the stack probe symbol.
         // This is defined in the `compiler-builtins` crate for each architecture.
-        StackProbeType::Call => &mangle_internal_symbol(cx.tcx, "__rust_probestack"),
+        StackProbeType::Call => &mangle_internal_symbol(tcx, "__rust_probestack"),
         // Pick from the two above based on the LLVM version.
         StackProbeType::InlineOrCall { min_llvm_version_for_inline } => {
             if llvm_util::get_version() < min_llvm_version_for_inline {
-                &mangle_internal_symbol(cx.tcx, "__rust_probestack")
+                &mangle_internal_symbol(tcx, "__rust_probestack")
             } else {
                 "inline-asm"
             }
@@ -264,8 +274,8 @@ fn probestack_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
     Some(llvm::CreateAttrStringValue(cx.llcx, "probe-stack", attr_value))
 }
 
-fn stackprotector_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
-    let sspattr = match cx.sess().stack_protector() {
+fn stackprotector_attr<'ll>(cx: &SimpleCx<'ll>, sess: &Session) -> Option<&'ll Attribute> {
+    let sspattr = match sess.stack_protector() {
         StackProtector::None => return None,
         StackProtector::All => AttributeKind::StackProtectReq,
         StackProtector::Strong => AttributeKind::StackProtectStrong,
@@ -275,33 +285,34 @@ fn stackprotector_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
     Some(sspattr.create_attr(cx.llcx))
 }
 
-fn backchain_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
-    if cx.sess().target.arch != "s390x" {
+fn backchain_attr<'ll>(cx: &SimpleCx<'ll>, sess: &Session) -> Option<&'ll Attribute> {
+    if sess.target.arch != "s390x" {
         return None;
     }
 
-    let requested_features = cx.sess().opts.cg.target_feature.split(',');
+    let requested_features = sess.opts.cg.target_feature.split(',');
     let found_positive = requested_features.clone().any(|r| r == "+backchain");
 
     if found_positive { Some(llvm::CreateAttrString(cx.llcx, "backchain")) } else { None }
 }
 
-pub(crate) fn target_cpu_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> &'ll Attribute {
-    let target_cpu = llvm_util::target_cpu(cx.tcx.sess);
+pub(crate) fn target_cpu_attr<'ll>(cx: &SimpleCx<'ll>, sess: &Session) -> &'ll Attribute {
+    let target_cpu = llvm_util::target_cpu(sess);
     llvm::CreateAttrStringValue(cx.llcx, "target-cpu", target_cpu)
 }
 
-pub(crate) fn tune_cpu_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
-    llvm_util::tune_cpu(cx.tcx.sess)
+pub(crate) fn tune_cpu_attr<'ll>(cx: &SimpleCx<'ll>, sess: &Session) -> Option<&'ll Attribute> {
+    llvm_util::tune_cpu(sess)
         .map(|tune_cpu| llvm::CreateAttrStringValue(cx.llcx, "tune-cpu", tune_cpu))
 }
 
 /// Get the `target-features` LLVM attribute.
-pub(crate) fn target_features_attr<'ll>(
-    cx: &CodegenCx<'ll, '_>,
+pub(crate) fn target_features_attr<'ll, 'tcx>(
+    cx: &SimpleCx<'ll>,
+    tcx: TyCtxt<'tcx>,
     function_features: Vec<String>,
 ) -> Option<&'ll Attribute> {
-    let global_features = cx.tcx.global_backend_features(()).iter().map(String::as_str);
+    let global_features = tcx.global_backend_features(()).iter().map(String::as_str);
     let function_features = function_features.iter().map(String::as_str);
     let target_features =
         global_features.chain(function_features).intersperse(",").collect::<String>();
@@ -311,22 +322,22 @@ pub(crate) fn target_features_attr<'ll>(
 
 /// Get the `NonLazyBind` LLVM attribute,
 /// if the codegen options allow skipping the PLT.
-pub(crate) fn non_lazy_bind_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> {
+pub(crate) fn non_lazy_bind_attr<'ll>(
+    cx: &SimpleCx<'ll>,
+    sess: &Session,
+) -> Option<&'ll Attribute> {
     // Don't generate calls through PLT if it's not necessary
-    if !cx.sess().needs_plt() {
-        Some(AttributeKind::NonLazyBind.create_attr(cx.llcx))
-    } else {
-        None
-    }
+    if !sess.needs_plt() { Some(AttributeKind::NonLazyBind.create_attr(cx.llcx)) } else { None }
 }
 
 /// Get the default optimizations attrs for a function.
 #[inline]
 pub(crate) fn default_optimisation_attrs<'ll>(
-    cx: &CodegenCx<'ll, '_>,
+    cx: &SimpleCx<'ll>,
+    sess: &Session,
 ) -> SmallVec<[&'ll Attribute; 2]> {
     let mut attrs = SmallVec::new();
-    match cx.sess().opts.optimize {
+    match sess.opts.optimize {
         OptLevel::Size => {
             attrs.push(llvm::AttributeKind::OptimizeForSize.create_attr(cx.llcx));
         }
@@ -347,17 +358,18 @@ fn create_alloc_family_attr(llcx: &llvm::Context) -> &llvm::Attribute {
 /// Composite function which sets LLVM attributes for function depending on its AST (`#[attribute]`)
 /// attributes.
 pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
-    cx: &CodegenCx<'ll, 'tcx>,
+    cx: &SimpleCx<'ll>,
+    tcx: TyCtxt<'tcx>,
     llfn: &'ll Value,
-    instance: ty::Instance<'tcx>,
+    codegen_fn_attrs: &CodegenFnAttrs,
+    instance: Option<ty::Instance<'tcx>>,
 ) {
-    let codegen_fn_attrs = cx.tcx.codegen_instance_attrs(instance.def);
-
+    let sess = tcx.sess;
     let mut to_add = SmallVec::<[_; 16]>::new();
 
     match codegen_fn_attrs.optimize {
         OptimizeAttr::Default => {
-            to_add.extend(default_optimisation_attrs(cx));
+            to_add.extend(default_optimisation_attrs(cx, sess));
         }
         OptimizeAttr::DoNotOptimize => {
             to_add.push(llvm::AttributeKind::OptimizeNone.create_attr(cx.llcx));
@@ -369,21 +381,21 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
         OptimizeAttr::Speed => {}
     }
 
-    if cx.sess().must_emit_unwind_tables() {
-        to_add.push(uwtable_attr(cx.llcx, cx.sess().opts.unstable_opts.use_sync_unwind));
+    if sess.must_emit_unwind_tables() {
+        to_add.push(uwtable_attr(cx.llcx, sess.opts.unstable_opts.use_sync_unwind));
     }
 
-    if cx.sess().opts.unstable_opts.profile_sample_use.is_some() {
+    if sess.opts.unstable_opts.profile_sample_use.is_some() {
         to_add.push(llvm::CreateAttrString(cx.llcx, "use-sample-profile"));
     }
 
     // FIXME: none of these functions interact with source level attributes.
-    to_add.extend(frame_pointer_type_attr(cx));
-    to_add.extend(function_return_attr(cx));
-    to_add.extend(instrument_function_attr(cx));
-    to_add.extend(nojumptables_attr(cx));
-    to_add.extend(probestack_attr(cx));
-    to_add.extend(stackprotector_attr(cx));
+    to_add.extend(frame_pointer_type_attr(cx, sess));
+    to_add.extend(function_return_attr(cx, sess));
+    to_add.extend(instrument_function_attr(cx, sess));
+    to_add.extend(nojumptables_attr(cx, sess));
+    to_add.extend(probestack_attr(cx, tcx));
+    to_add.extend(stackprotector_attr(cx, sess));
 
     if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_BUILTINS) {
         to_add.push(llvm::CreateAttrString(cx.llcx, "no-builtins"));
@@ -404,13 +416,13 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
         // not used.
     } else {
         // Do not set sanitizer attributes for naked functions.
-        to_add.extend(sanitize_attrs(cx, codegen_fn_attrs.no_sanitize));
+        to_add.extend(sanitize_attrs(cx, tcx, codegen_fn_attrs.no_sanitize));
 
         // For non-naked functions, set branch protection attributes on aarch64.
         if let Some(BranchProtection { bti, pac_ret, gcs }) =
-            cx.sess().opts.unstable_opts.branch_protection
+            sess.opts.unstable_opts.branch_protection
         {
-            assert!(cx.sess().target.arch == "aarch64");
+            assert!(sess.target.arch == "aarch64");
             if bti {
                 to_add.push(llvm::CreateAttrString(cx.llcx, "branch-target-enforcement"));
             }
@@ -438,14 +450,15 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
         || codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::ALLOCATOR_ZEROED)
     {
         to_add.push(create_alloc_family_attr(cx.llcx));
-        if let Some(zv) =
-            cx.tcx.get_attr(instance.def_id(), rustc_span::sym::rustc_allocator_zeroed_variant)
+        if let Some(instance) = instance
+            && let Some(zv) =
+                tcx.get_attr(instance.def_id(), rustc_span::sym::rustc_allocator_zeroed_variant)
             && let Some(name) = zv.value_str()
         {
             to_add.push(llvm::CreateAttrStringValue(
                 cx.llcx,
                 "alloc-variant-zeroed",
-                &mangle_internal_symbol(cx.tcx, name.as_str()),
+                &mangle_internal_symbol(tcx, name.as_str()),
             ));
         }
         // apply to argument place instead of function
@@ -490,18 +503,22 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
     if let Some(align) = codegen_fn_attrs.alignment {
         llvm::set_alignment(llfn, align);
     }
-    if let Some(backchain) = backchain_attr(cx) {
+    if let Some(backchain) = backchain_attr(cx, sess) {
         to_add.push(backchain);
     }
-    to_add.extend(patchable_function_entry_attrs(cx, codegen_fn_attrs.patchable_function_entry));
+    to_add.extend(patchable_function_entry_attrs(
+        cx,
+        sess,
+        codegen_fn_attrs.patchable_function_entry,
+    ));
 
     // Always annotate functions with the target-cpu they are compiled for.
     // Without this, ThinLTO won't inline Rust functions into Clang generated
     // functions (because Clang annotates functions this way too).
-    to_add.push(target_cpu_attr(cx));
+    to_add.push(target_cpu_attr(cx, sess));
     // tune-cpu is only conveyed through the attribute for our purpose.
     // The target doesn't care; the subtarget reads our attribute.
-    to_add.extend(tune_cpu_attr(cx));
+    to_add.extend(tune_cpu_attr(cx, sess));
 
     let function_features =
         codegen_fn_attrs.target_features.iter().map(|f| f.name.as_str()).collect::<Vec<&str>>();
@@ -509,7 +526,9 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
     // Apply function attributes as per usual if there are no user defined
     // target features otherwise this will get applied at the callsite.
     if function_features.is_empty() {
-        if let Some(inline_attr) = inline_attr(cx, instance) {
+        if let Some(instance) = instance
+            && let Some(inline_attr) = inline_attr(cx, tcx, instance)
+        {
             to_add.push(inline_attr);
         }
     }
@@ -517,7 +536,7 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
     let function_features = function_features
         .iter()
         // Convert to LLVMFeatures and filter out unavailable ones
-        .flat_map(|feat| llvm_util::to_llvm_features(cx.tcx.sess, feat))
+        .flat_map(|feat| llvm_util::to_llvm_features(sess, feat))
         // Convert LLVMFeatures & dependencies to +<feats>s
         .flat_map(|feat| feat.into_iter().map(|f| format!("+{f}")))
         .chain(codegen_fn_attrs.instruction_set.iter().map(|x| match x {
@@ -526,20 +545,22 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
         }))
         .collect::<Vec<String>>();
 
-    if cx.tcx.sess.target.is_like_wasm {
+    if sess.target.is_like_wasm {
         // If this function is an import from the environment but the wasm
         // import has a specific module/name, apply them here.
-        if let Some(module) = wasm_import_module(cx.tcx, instance.def_id()) {
+        if let Some(instance) = instance
+            && let Some(module) = wasm_import_module(tcx, instance.def_id())
+        {
             to_add.push(llvm::CreateAttrStringValue(cx.llcx, "wasm-import-module", module));
 
             let name =
-                codegen_fn_attrs.symbol_name.unwrap_or_else(|| cx.tcx.item_name(instance.def_id()));
+                codegen_fn_attrs.symbol_name.unwrap_or_else(|| tcx.item_name(instance.def_id()));
             let name = name.as_str();
             to_add.push(llvm::CreateAttrStringValue(cx.llcx, "wasm-import-name", name));
         }
     }
 
-    to_add.extend(target_features_attr(cx, function_features));
+    to_add.extend(target_features_attr(cx, tcx, function_features));
 
     attributes::apply_to_llfn(llfn, Function, &to_add);
 }
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs
index 978134cc32b..6d12b511e9c 100644
--- a/compiler/rustc_codegen_llvm/src/base.rs
+++ b/compiler/rustc_codegen_llvm/src/base.rs
@@ -105,7 +105,7 @@ pub(crate) fn compile_codegen_unit(
             if let Some(entry) =
                 maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx, cx.codegen_unit)
             {
-                let attrs = attributes::sanitize_attrs(&cx, SanitizerSet::empty());
+                let attrs = attributes::sanitize_attrs(&cx, tcx, SanitizerSet::empty());
                 attributes::apply_to_llfn(entry, llvm::AttributePlace::Function, &attrs);
             }
 
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 0f17cc9063a..a4dc4eb532f 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -1433,7 +1433,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
                 // If there is an inline attribute and a target feature that matches
                 // we will add the attribute to the callsite otherwise we'll omit
                 // this and not add the attribute to prevent soundness issues.
-                && let Some(inlining_rule) = attributes::inline_attr(&self.cx, instance)
+                && let Some(inlining_rule) = attributes::inline_attr(&self.cx, self.cx.tcx, instance)
                 && self.cx.tcx.is_target_feature_call_safe(
                     &fn_call_attrs.target_features,
                     &fn_defn_attrs.target_features,
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index b7d2241da47..aa5c17269fb 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -876,7 +876,7 @@ impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
                 } else {
                     let fty = self.type_variadic_func(&[], self.type_i32());
                     let llfn = self.declare_cfn(name, llvm::UnnamedAddr::Global, fty);
-                    let target_cpu = attributes::target_cpu_attr(self);
+                    let target_cpu = attributes::target_cpu_attr(self, self.sess());
                     attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &[target_cpu]);
                     llfn
                 }
@@ -891,15 +891,15 @@ impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
     }
 
     fn set_frame_pointer_type(&self, llfn: &'ll Value) {
-        if let Some(attr) = attributes::frame_pointer_type_attr(self) {
+        if let Some(attr) = attributes::frame_pointer_type_attr(self, self.sess()) {
             attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &[attr]);
         }
     }
 
     fn apply_target_cpu_attr(&self, llfn: &'ll Value) {
         let mut attrs = SmallVec::<[_; 2]>::new();
-        attrs.push(attributes::target_cpu_attr(self));
-        attrs.extend(attributes::tune_cpu_attr(self));
+        attrs.push(attributes::target_cpu_attr(self, self.sess()));
+        attrs.extend(attributes::tune_cpu_attr(self, self.sess()));
         attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &attrs);
     }
 
@@ -918,7 +918,7 @@ impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
             attributes::apply_to_llfn(
                 llfn,
                 llvm::AttributePlace::Function,
-                attributes::target_features_attr(self, vec![]).as_slice(),
+                attributes::target_features_attr(self, self.tcx, vec![]).as_slice(),
             );
             Some(llfn)
         } else {
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
index 7a6dc008c7b..3081badb821 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
@@ -2,9 +2,9 @@
 
 use rustc_codegen_ssa::base::collect_debugger_visualizers_transitive;
 use rustc_codegen_ssa::traits::*;
+use rustc_hir::attrs::DebuggerVisualizerType;
 use rustc_hir::def_id::LOCAL_CRATE;
 use rustc_middle::bug;
-use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerType;
 use rustc_session::config::{CrateType, DebugInfo};
 
 use crate::builder::Builder;
diff --git a/compiler/rustc_codegen_llvm/src/declare.rs b/compiler/rustc_codegen_llvm/src/declare.rs
index 960a895a203..36cdb498839 100644
--- a/compiler/rustc_codegen_llvm/src/declare.rs
+++ b/compiler/rustc_codegen_llvm/src/declare.rs
@@ -76,7 +76,7 @@ pub(crate) fn declare_raw_fn<'ll, 'tcx>(
         attrs.push(llvm::AttributeKind::NoRedZone.create_attr(cx.llcx));
     }
 
-    attrs.extend(attributes::non_lazy_bind_attr(cx));
+    attrs.extend(attributes::non_lazy_bind_attr(cx, cx.tcx.sess));
 
     attributes::apply_to_llfn(llfn, Function, &attrs);
 
diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs
index 68a2f43ec67..422b06350e1 100644
--- a/compiler/rustc_codegen_ssa/src/base.rs
+++ b/compiler/rustc_codegen_ssa/src/base.rs
@@ -11,12 +11,12 @@ use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
 use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry};
 use rustc_data_structures::sync::{IntoDynSyncSend, par_map};
 use rustc_data_structures::unord::UnordMap;
-use rustc_hir::attrs::OptimizeAttr;
+use rustc_hir::attrs::{DebuggerVisualizerType, OptimizeAttr};
 use rustc_hir::def_id::{DefId, LOCAL_CRATE};
 use rustc_hir::lang_items::LangItem;
 use rustc_hir::{ItemId, Target};
 use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
-use rustc_middle::middle::debugger_visualizer::{DebuggerVisualizerFile, DebuggerVisualizerType};
+use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerFile;
 use rustc_middle::middle::dependency_format::Dependencies;
 use rustc_middle::middle::exported_symbols::{self, SymbolExportKind};
 use rustc_middle::middle::lang_items;
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs
index 3956125bace..33b712e3aed 100644
--- a/compiler/rustc_expand/src/base.rs
+++ b/compiler/rustc_expand/src/base.rs
@@ -324,16 +324,16 @@ pub trait BangProcMacro {
 
 impl<F> BangProcMacro for F
 where
-    F: Fn(TokenStream) -> TokenStream,
+    F: Fn(&mut ExtCtxt<'_>, Span, TokenStream) -> Result<TokenStream, ErrorGuaranteed>,
 {
     fn expand<'cx>(
         &self,
-        _ecx: &'cx mut ExtCtxt<'_>,
-        _span: Span,
+        ecx: &'cx mut ExtCtxt<'_>,
+        span: Span,
         ts: TokenStream,
     ) -> Result<TokenStream, ErrorGuaranteed> {
         // FIXME setup implicit context in TLS before calling self.
-        Ok(self(ts))
+        self(ecx, span, ts)
     }
 }
 
@@ -999,17 +999,14 @@ impl SyntaxExtension {
 
     /// A dummy bang macro `foo!()`.
     pub fn dummy_bang(edition: Edition) -> SyntaxExtension {
-        fn expander<'cx>(
-            cx: &'cx mut ExtCtxt<'_>,
+        fn expand(
+            ecx: &mut ExtCtxt<'_>,
             span: Span,
-            _: TokenStream,
-        ) -> MacroExpanderResult<'cx> {
-            ExpandResult::Ready(DummyResult::any(
-                span,
-                cx.dcx().span_delayed_bug(span, "expanded a dummy bang macro"),
-            ))
+            _ts: TokenStream,
+        ) -> Result<TokenStream, ErrorGuaranteed> {
+            Err(ecx.dcx().span_delayed_bug(span, "expanded a dummy bang macro"))
         }
-        SyntaxExtension::default(SyntaxExtensionKind::LegacyBang(Arc::new(expander)), edition)
+        SyntaxExtension::default(SyntaxExtensionKind::Bang(Arc::new(expand)), edition)
     }
 
     /// A dummy derive macro `#[derive(Foo)]`.
diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs
index 4c0e0bbfe26..172bc3d1d9f 100644
--- a/compiler/rustc_expand/src/expand.rs
+++ b/compiler/rustc_expand/src/expand.rs
@@ -971,7 +971,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
                             });
                         }
                     },
-                    SyntaxExtensionKind::LegacyBang(..) => {
+                    SyntaxExtensionKind::Bang(..) => {
                         let msg = "expanded a dummy glob delegation";
                         let guar = self.cx.dcx().span_delayed_bug(span, msg);
                         return ExpandResult::Ready(fragment_kind.dummy(span, guar));
diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs
index 1d147a0385c..d4504ba720e 100644
--- a/compiler/rustc_expand/src/mbe/macro_rules.rs
+++ b/compiler/rustc_expand/src/mbe/macro_rules.rs
@@ -33,8 +33,8 @@ use super::diagnostics::{FailedMacro, failed_to_match_macro};
 use super::macro_parser::{NamedMatches, NamedParseResult};
 use super::{SequenceRepetition, diagnostics};
 use crate::base::{
-    AttrProcMacro, DummyResult, ExpandResult, ExtCtxt, MacResult, MacroExpanderResult,
-    SyntaxExtension, SyntaxExtensionKind, TTMacroExpander,
+    AttrProcMacro, BangProcMacro, DummyResult, ExpandResult, ExtCtxt, MacResult,
+    MacroExpanderResult, SyntaxExtension, SyntaxExtensionKind, TTMacroExpander,
 };
 use crate::errors;
 use crate::expand::{AstFragment, AstFragmentKind, ensure_complete_parse, parse_ast_fragment};
@@ -267,16 +267,16 @@ impl AttrProcMacro for MacroRulesMacroExpander {
     }
 }
 
-struct DummyExpander(ErrorGuaranteed);
+struct DummyBang(ErrorGuaranteed);
 
-impl TTMacroExpander for DummyExpander {
+impl BangProcMacro for DummyBang {
     fn expand<'cx>(
         &self,
         _: &'cx mut ExtCtxt<'_>,
-        span: Span,
+        _: Span,
         _: TokenStream,
-    ) -> ExpandResult<Box<dyn MacResult + 'cx>, ()> {
-        ExpandResult::Ready(DummyResult::any(span, self.0))
+    ) -> Result<TokenStream, ErrorGuaranteed> {
+        Err(self.0)
     }
 }
 
@@ -664,7 +664,7 @@ pub fn compile_declarative_macro(
         SyntaxExtension::new(sess, kind, span, Vec::new(), edition, ident.name, attrs, is_local)
     };
     let dummy_syn_ext =
-        |guar| (mk_syn_ext(SyntaxExtensionKind::LegacyBang(Arc::new(DummyExpander(guar)))), 0);
+        |guar| (mk_syn_ext(SyntaxExtensionKind::Bang(Arc::new(DummyBang(guar)))), 0);
 
     let macro_rules = macro_def.macro_rules;
     let exp_sep = if macro_rules { exp!(Semi) } else { exp!(Comma) };
@@ -894,12 +894,12 @@ fn check_redundant_vis_repetition(
     seq: &SequenceRepetition,
     span: &DelimSpan,
 ) {
-    let is_zero_or_one: bool = seq.kleene.op == KleeneOp::ZeroOrOne;
-    let is_vis = seq.tts.first().map_or(false, |tt| {
-        matches!(tt, mbe::TokenTree::MetaVarDecl { kind: NonterminalKind::Vis, .. })
-    });
-
-    if is_vis && is_zero_or_one {
+    if seq.kleene.op == KleeneOp::ZeroOrOne
+        && matches!(
+            seq.tts.first(),
+            Some(mbe::TokenTree::MetaVarDecl { kind: NonterminalKind::Vis, .. })
+        )
+    {
         err.note("a `vis` fragment can already be empty");
         err.multipart_suggestion(
             "remove the `$(` and `)?`",
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs
index 5481c9debc1..ddcbaeaad88 100644
--- a/compiler/rustc_hir/src/attrs/data_structures.rs
+++ b/compiler/rustc_hir/src/attrs/data_structures.rs
@@ -363,6 +363,20 @@ pub struct LinkEntry {
     pub import_name_type: Option<(PeImportNameType, Span)>,
 }
 
+#[derive(HashStable_Generic, PrintAttribute)]
+#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Debug, Encodable, Decodable)]
+pub enum DebuggerVisualizerType {
+    Natvis,
+    GdbPrettyPrinter,
+}
+
+#[derive(Debug, Encodable, Decodable, Clone, HashStable_Generic, PrintAttribute)]
+pub struct DebugVisualizer {
+    pub span: Span,
+    pub visualizer_type: DebuggerVisualizerType,
+    pub path: Symbol,
+}
+
 /// Represents parsed *built-in* inert attributes.
 ///
 /// ## Overview
@@ -485,7 +499,10 @@ pub enum AttributeKind {
     /// Represents `#[custom_mir]`.
     CustomMir(Option<(MirDialect, Span)>, Option<(MirPhase, Span)>, Span),
 
-    ///Represents `#[rustc_deny_explicit_impl]`.
+    /// Represents `#[debugger_visualizer]`.
+    DebuggerVisualizer(ThinVec<DebugVisualizer>),
+
+    /// Represents `#[rustc_deny_explicit_impl]`.
     DenyExplicitImpl(Span),
 
     /// Represents [`#[deprecated]`](https://doc.rust-lang.org/stable/reference/attributes/diagnostics.html#the-deprecated-attribute).
diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
index e0a37f50f45..1611b865c77 100644
--- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
+++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs
@@ -37,6 +37,7 @@ impl AttributeKind {
             Coverage(..) => No,
             CrateName { .. } => No,
             CustomMir(_, _, _) => Yes,
+            DebuggerVisualizer(..) => No,
             DenyExplicitImpl(..) => No,
             Deprecation { .. } => Yes,
             DoNotImplementViaObject(..) => No,
diff --git a/compiler/rustc_macros/src/query.rs b/compiler/rustc_macros/src/query.rs
index 5821ffa3a30..5d32950875a 100644
--- a/compiler/rustc_macros/src/query.rs
+++ b/compiler/rustc_macros/src/query.rs
@@ -5,7 +5,7 @@ use syn::punctuated::Punctuated;
 use syn::spanned::Spanned;
 use syn::{
     AttrStyle, Attribute, Block, Error, Expr, Ident, Pat, ReturnType, Token, Type, braced,
-    parenthesized, parse_macro_input, parse_quote, token,
+    parenthesized, parse_macro_input, token,
 };
 
 mod kw {
diff --git a/compiler/rustc_middle/src/middle/debugger_visualizer.rs b/compiler/rustc_middle/src/middle/debugger_visualizer.rs
index 5a811321f58..a7f0095dcdf 100644
--- a/compiler/rustc_middle/src/middle/debugger_visualizer.rs
+++ b/compiler/rustc_middle/src/middle/debugger_visualizer.rs
@@ -1,15 +1,9 @@
 use std::path::PathBuf;
 use std::sync::Arc;
 
+use rustc_hir::attrs::DebuggerVisualizerType;
 use rustc_macros::{Decodable, Encodable, HashStable};
 
-#[derive(HashStable)]
-#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Debug, Encodable, Decodable)]
-pub enum DebuggerVisualizerType {
-    Natvis,
-    GdbPrettyPrinter,
-}
-
 /// A single debugger visualizer file.
 #[derive(HashStable)]
 #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Encodable, Decodable)]
diff --git a/compiler/rustc_mir_build/src/builder/mod.rs b/compiler/rustc_mir_build/src/builder/mod.rs
index cdb2c5561ce..7ca94e655fb 100644
--- a/compiler/rustc_mir_build/src/builder/mod.rs
+++ b/compiler/rustc_mir_build/src/builder/mod.rs
@@ -395,12 +395,10 @@ enum NeedsTemporary {
     Maybe,
 }
 
-///////////////////////////////////////////////////////////////////////////
 /// The `BlockAnd` "monad" packages up the new basic block along with a
 /// produced value (sometimes just unit, of course). The `unpack!`
 /// macro (and methods below) makes working with `BlockAnd` much more
 /// convenient.
-
 #[must_use = "if you don't use one of these results, you're leaving a dangling edge"]
 struct BlockAnd<T>(BasicBlock, T);
 
@@ -438,9 +436,7 @@ macro_rules! unpack {
     }};
 }
 
-///////////////////////////////////////////////////////////////////////////
-/// the main entry point for building MIR for a function
-
+/// The main entry point for building MIR for a function.
 fn construct_fn<'tcx>(
     tcx: TyCtxt<'tcx>,
     fn_def: LocalDefId,
diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl
index 6cd68380e46..870e0a90b54 100644
--- a/compiler/rustc_passes/messages.ftl
+++ b/compiler/rustc_passes/messages.ftl
@@ -93,15 +93,6 @@ passes_dead_codes =
        }
     } never {$participle}
 
-passes_debug_visualizer_invalid =
-    invalid argument
-    .note_1 = expected: `natvis_file = "..."`
-    .note_2 = OR
-    .note_3 = expected: `gdb_script_file = "..."`
-
-passes_debug_visualizer_placement =
-    attribute should be applied to a module
-
 passes_debug_visualizer_unreadable =
     couldn't read {$file}: {$error}
 
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index aef123c3721..007353f136d 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -282,6 +282,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                     | AttributeKind::ObjcClass { .. }
                     | AttributeKind::ObjcSelector { .. }
                     | AttributeKind::RustcCoherenceIsCore(..)
+                    | AttributeKind::DebuggerVisualizer(..)
                 ) => { /* do nothing  */ }
                 Attribute::Unparsed(attr_item) => {
                     style = Some(attr_item.style);
@@ -302,7 +303,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                             &mut doc_aliases,
                         ),
                         [sym::no_link, ..] => self.check_no_link(hir_id, attr, span, target),
-                        [sym::debugger_visualizer, ..] => self.check_debugger_visualizer(attr, target),
                         [sym::rustc_no_implicit_autorefs, ..] => {
                             self.check_applied_to_fn_or_method(hir_id, attr.span(), span, target)
                         }
@@ -1783,20 +1783,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
         }
     }
 
-    /// Checks if the items on the `#[debugger_visualizer]` attribute are valid.
-    fn check_debugger_visualizer(&self, attr: &Attribute, target: Target) {
-        // Here we only check that the #[debugger_visualizer] attribute is attached
-        // to nothing other than a module. All other checks are done in the
-        // `debugger_visualizer` query where they need to be done for decoding
-        // anyway.
-        match target {
-            Target::Mod => {}
-            _ => {
-                self.dcx().emit_err(errors::DebugVisualizerPlacement { span: attr.span() });
-            }
-        }
-    }
-
     /// Outputs an error for `#[allow_internal_unstable]` which can only be applied to macros.
     /// (Allows proc_macro functions)
     fn check_rustc_allow_const_fn_unstable(
diff --git a/compiler/rustc_passes/src/debugger_visualizer.rs b/compiler/rustc_passes/src/debugger_visualizer.rs
index 7a7a8175e55..7211f3cf85b 100644
--- a/compiler/rustc_passes/src/debugger_visualizer.rs
+++ b/compiler/rustc_passes/src/debugger_visualizer.rs
@@ -1,67 +1,60 @@
 //! Detecting usage of the `#[debugger_visualizer]` attribute.
 
-use rustc_ast::Attribute;
+use rustc_ast::ast::NodeId;
+use rustc_ast::{HasNodeId, ItemKind, ast};
+use rustc_attr_parsing::AttributeParser;
 use rustc_expand::base::resolve_path;
-use rustc_middle::middle::debugger_visualizer::{DebuggerVisualizerFile, DebuggerVisualizerType};
+use rustc_hir::Attribute;
+use rustc_hir::attrs::{AttributeKind, DebugVisualizer};
+use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerFile;
 use rustc_middle::query::{LocalCrate, Providers};
 use rustc_middle::ty::TyCtxt;
 use rustc_session::Session;
-use rustc_span::sym;
+use rustc_span::{DUMMY_SP, Span, sym};
 
-use crate::errors::{DebugVisualizerInvalid, DebugVisualizerUnreadable};
+use crate::errors::DebugVisualizerUnreadable;
 
 impl DebuggerVisualizerCollector<'_> {
-    fn check_for_debugger_visualizer(&mut self, attr: &Attribute) {
-        if attr.has_name(sym::debugger_visualizer) {
-            let Some(hints) = attr.meta_item_list() else {
-                self.sess.dcx().emit_err(DebugVisualizerInvalid { span: attr.span });
-                return;
-            };
+    fn check_for_debugger_visualizer(
+        &mut self,
+        attrs: &[ast::Attribute],
+        span: Span,
+        node_id: NodeId,
+    ) {
+        if let Some(Attribute::Parsed(AttributeKind::DebuggerVisualizer(visualizers))) =
+            AttributeParser::parse_limited(
+                &self.sess,
+                attrs,
+                sym::debugger_visualizer,
+                span,
+                node_id,
+                None,
+            )
+        {
+            for DebugVisualizer { span, visualizer_type, path } in visualizers {
+                let file = match resolve_path(&self.sess, path.as_str(), span) {
+                    Ok(file) => file,
+                    Err(err) => {
+                        err.emit();
+                        return;
+                    }
+                };
 
-            let [hint] = hints.as_slice() else {
-                self.sess.dcx().emit_err(DebugVisualizerInvalid { span: attr.span });
-                return;
-            };
-
-            let Some(meta_item) = hint.meta_item() else {
-                self.sess.dcx().emit_err(DebugVisualizerInvalid { span: attr.span });
-                return;
-            };
-
-            let (visualizer_type, visualizer_path) = match (meta_item.name(), meta_item.value_str())
-            {
-                (Some(sym::natvis_file), Some(value)) => (DebuggerVisualizerType::Natvis, value),
-                (Some(sym::gdb_script_file), Some(value)) => {
-                    (DebuggerVisualizerType::GdbPrettyPrinter, value)
-                }
-                (_, _) => {
-                    self.sess.dcx().emit_err(DebugVisualizerInvalid { span: meta_item.span });
-                    return;
-                }
-            };
-
-            let file = match resolve_path(&self.sess, visualizer_path.as_str(), attr.span) {
-                Ok(file) => file,
-                Err(err) => {
-                    err.emit();
-                    return;
-                }
-            };
-
-            match self.sess.source_map().load_binary_file(&file) {
-                Ok((source, _)) => {
-                    self.visualizers.push(DebuggerVisualizerFile::new(
-                        source,
-                        visualizer_type,
-                        file,
-                    ));
-                }
-                Err(error) => {
-                    self.sess.dcx().emit_err(DebugVisualizerUnreadable {
-                        span: meta_item.span,
-                        file: &file,
-                        error,
-                    });
+                match self.sess.source_map().load_binary_file(&file) {
+                    Ok((source, _)) => {
+                        self.visualizers.push(DebuggerVisualizerFile::new(
+                            source,
+                            visualizer_type,
+                            file,
+                        ));
+                    }
+                    Err(error) => {
+                        self.sess.dcx().emit_err(DebugVisualizerUnreadable {
+                            span,
+                            file: &file,
+                            error,
+                        });
+                    }
                 }
             }
         }
@@ -74,9 +67,15 @@ struct DebuggerVisualizerCollector<'a> {
 }
 
 impl<'ast> rustc_ast::visit::Visitor<'ast> for DebuggerVisualizerCollector<'_> {
-    fn visit_attribute(&mut self, attr: &'ast Attribute) {
-        self.check_for_debugger_visualizer(attr);
-        rustc_ast::visit::walk_attribute(self, attr);
+    fn visit_item(&mut self, item: &'ast rustc_ast::Item) -> Self::Result {
+        if let ItemKind::Mod(..) = item.kind {
+            self.check_for_debugger_visualizer(&item.attrs, item.span, item.node_id());
+        }
+        rustc_ast::visit::walk_item(self, item);
+    }
+    fn visit_crate(&mut self, krate: &'ast ast::Crate) -> Self::Result {
+        self.check_for_debugger_visualizer(&krate.attrs, DUMMY_SP, krate.id);
+        rustc_ast::visit::walk_crate(self, krate);
     }
 }
 
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs
index cd8935f6b2f..cfd6b9e6dff 100644
--- a/compiler/rustc_passes/src/errors.rs
+++ b/compiler/rustc_passes/src/errors.rs
@@ -476,23 +476,6 @@ pub(crate) struct MacroOnlyAttribute {
 }
 
 #[derive(Diagnostic)]
-#[diag(passes_debug_visualizer_placement)]
-pub(crate) struct DebugVisualizerPlacement {
-    #[primary_span]
-    pub span: Span,
-}
-
-#[derive(Diagnostic)]
-#[diag(passes_debug_visualizer_invalid)]
-#[note(passes_note_1)]
-#[note(passes_note_2)]
-#[note(passes_note_3)]
-pub(crate) struct DebugVisualizerInvalid {
-    #[primary_span]
-    pub span: Span,
-}
-
-#[derive(Diagnostic)]
 #[diag(passes_debug_visualizer_unreadable)]
 pub(crate) struct DebugVisualizerUnreadable<'a> {
     #[primary_span]
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs
index 1bddbd03cc3..c9dbb204f61 100644
--- a/compiler/rustc_privacy/src/lib.rs
+++ b/compiler/rustc_privacy/src/lib.rs
@@ -45,7 +45,7 @@ use tracing::debug;
 rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// Generic infrastructure used to implement specific visitors below.
+// Generic infrastructure used to implement specific visitors below.
 ////////////////////////////////////////////////////////////////////////////////
 
 struct LazyDefPathStr<'tcx> {
@@ -309,10 +309,7 @@ fn min(vis1: ty::Visibility, vis2: ty::Visibility, tcx: TyCtxt<'_>) -> ty::Visib
     if vis1.is_at_least(vis2, tcx) { vis2 } else { vis1 }
 }
 
-////////////////////////////////////////////////////////////////////////////////
 /// Visitor used to determine impl visibility and reachability.
-////////////////////////////////////////////////////////////////////////////////
-
 struct FindMin<'a, 'tcx, VL: VisibilityLike, const SHALLOW: bool> {
     tcx: TyCtxt<'tcx>,
     effective_visibilities: &'a EffectiveVisibilities,
@@ -387,10 +384,7 @@ impl VisibilityLike for EffectiveVisibility {
     }
 }
 
-////////////////////////////////////////////////////////////////////////////////
 /// The embargo visitor, used to determine the exports of the AST.
-////////////////////////////////////////////////////////////////////////////////
-
 struct EmbargoVisitor<'tcx> {
     tcx: TyCtxt<'tcx>,
 
@@ -849,9 +843,7 @@ impl<'tcx> DefIdVisitor<'tcx> for ReachEverythingInTheInterfaceVisitor<'_, 'tcx>
     }
 }
 
-////////////////////////////////////////////////////////////////////////////////
 /// Visitor, used for EffectiveVisibilities table checking
-////////////////////////////////////////////////////////////////////////////////
 pub struct TestReachabilityVisitor<'a, 'tcx> {
     tcx: TyCtxt<'tcx>,
     effective_visibilities: &'a EffectiveVisibilities,
@@ -909,13 +901,11 @@ impl<'a, 'tcx> TestReachabilityVisitor<'a, 'tcx> {
     }
 }
 
-//////////////////////////////////////////////////////////////////////////////////////
 /// Name privacy visitor, checks privacy and reports violations.
+///
 /// Most of name privacy checks are performed during the main resolution phase,
 /// or later in type checking when field accesses and associated items are resolved.
 /// This pass performs remaining checks for fields in struct expressions and patterns.
-//////////////////////////////////////////////////////////////////////////////////////
-
 struct NamePrivacyVisitor<'tcx> {
     tcx: TyCtxt<'tcx>,
     maybe_typeck_results: Option<&'tcx ty::TypeckResults<'tcx>>,
@@ -1120,12 +1110,10 @@ impl<'tcx> Visitor<'tcx> for NamePrivacyVisitor<'tcx> {
     }
 }
 
-////////////////////////////////////////////////////////////////////////////////////////////
 /// Type privacy visitor, checks types for privacy and reports violations.
+///
 /// Both explicitly written types and inferred types of expressions and patterns are checked.
 /// Checks are performed on "semantic" types regardless of names and their hygiene.
-////////////////////////////////////////////////////////////////////////////////////////////
-
 struct TypePrivacyVisitor<'tcx> {
     tcx: TyCtxt<'tcx>,
     module_def_id: LocalModDefId,
@@ -1345,13 +1333,11 @@ impl<'tcx> DefIdVisitor<'tcx> for TypePrivacyVisitor<'tcx> {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////////
 /// SearchInterfaceForPrivateItemsVisitor traverses an item's interface and
 /// finds any private components in it.
+///
 /// PrivateItemsInPublicInterfacesVisitor ensures there are no private types
 /// and traits in public interfaces.
-///////////////////////////////////////////////////////////////////////////////
-
 struct SearchInterfaceForPrivateItemsVisitor<'tcx> {
     tcx: TyCtxt<'tcx>,
     item_def_id: LocalDefId,
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs
index 35051675fd8..51489019950 100644
--- a/compiler/rustc_resolve/src/ident.rs
+++ b/compiler/rustc_resolve/src/ident.rs
@@ -492,14 +492,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                         _ => Err(Determinacy::Determined),
                     },
                     Scope::Module(module, derive_fallback_lint_id) => {
-                        // FIXME: use `finalize_scope` here.
                         let (adjusted_parent_scope, adjusted_finalize) =
                             if matches!(scope_set, ScopeSet::ModuleAndExternPrelude(..)) {
-                                (parent_scope, finalize)
+                                (parent_scope, finalize_scope!())
                             } else {
                                 (
                                     &ParentScope { module, ..*parent_scope },
-                                    finalize.map(|f| Finalize { used: Used::Scope, ..f }),
+                                    finalize_scope!().map(|f| Finalize { used: Used::Scope, ..f }),
                                 )
                             };
                         let binding = this.reborrow().resolve_ident_in_module_unadjusted(
@@ -557,8 +556,10 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                         None => Err(Determinacy::Determined),
                     },
                     Scope::ExternPreludeItems => {
-                        // FIXME: use `finalize_scope` here.
-                        match this.reborrow().extern_prelude_get_item(ident, finalize.is_some()) {
+                        match this
+                            .reborrow()
+                            .extern_prelude_get_item(ident, finalize_scope!().is_some())
+                        {
                             Some(binding) => {
                                 extern_prelude_item_binding = Some(binding);
                                 Ok((binding, Flags::empty()))
diff --git a/compiler/rustc_target/src/spec/base/windows_gnu.rs b/compiler/rustc_target/src/spec/base/windows_gnu.rs
index 4ba11021988..2867428e42f 100644
--- a/compiler/rustc_target/src/spec/base/windows_gnu.rs
+++ b/compiler/rustc_target/src/spec/base/windows_gnu.rs
@@ -93,10 +93,7 @@ pub(crate) fn opts() -> TargetOptions {
         binary_format: BinaryFormat::Coff,
         allows_weak_linkage: false,
         pre_link_args,
-        pre_link_objects: crt_objects::pre_mingw(),
-        post_link_objects: crt_objects::post_mingw(),
         pre_link_objects_self_contained: crt_objects::pre_mingw_self_contained(),
-        post_link_objects_self_contained: crt_objects::post_mingw_self_contained(),
         link_self_contained: LinkSelfContainedDefault::InferredForMingw,
         late_link_args,
         late_link_args_dynamic,
diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
index e3b6430a463..2d84e78f255 100644
--- a/compiler/rustc_target/src/spec/crt_objects.rs
+++ b/compiler/rustc_target/src/spec/crt_objects.rs
@@ -86,6 +86,17 @@ pub(super) fn post_musl_self_contained() -> CrtObjects {
 
 pub(super) fn pre_mingw_self_contained() -> CrtObjects {
     new(&[
+        (LinkOutputKind::DynamicNoPicExe, &["crt2.o"]),
+        (LinkOutputKind::DynamicPicExe, &["crt2.o"]),
+        (LinkOutputKind::StaticNoPicExe, &["crt2.o"]),
+        (LinkOutputKind::StaticPicExe, &["crt2.o"]),
+        (LinkOutputKind::DynamicDylib, &["dllcrt2.o"]),
+        (LinkOutputKind::StaticDylib, &["dllcrt2.o"]),
+    ])
+}
+
+pub(super) fn pre_i686_mingw_self_contained() -> CrtObjects {
+    new(&[
         (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
         (LinkOutputKind::DynamicPicExe, &["crt2.o", "rsbegin.o"]),
         (LinkOutputKind::StaticNoPicExe, &["crt2.o", "rsbegin.o"]),
@@ -95,15 +106,15 @@ pub(super) fn pre_mingw_self_contained() -> CrtObjects {
     ])
 }
 
-pub(super) fn post_mingw_self_contained() -> CrtObjects {
+pub(super) fn post_i686_mingw_self_contained() -> CrtObjects {
     all("rsend.o")
 }
 
-pub(super) fn pre_mingw() -> CrtObjects {
+pub(super) fn pre_i686_mingw() -> CrtObjects {
     all("rsbegin.o")
 }
 
-pub(super) fn post_mingw() -> CrtObjects {
+pub(super) fn post_i686_mingw() -> CrtObjects {
     all("rsend.o")
 }
 
diff --git a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs
index d227d63c4a3..0ae7cd7a377 100644
--- a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs
+++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs
@@ -12,7 +12,7 @@ pub(crate) fn target() -> Target {
         llvm_target: "armebv7r-none-eabi".into(),
         metadata: TargetMetadata {
             description: Some("Bare Armv7-R, Big Endian".into()),
-            tier: Some(2),
+            tier: Some(3),
             host_tools: Some(false),
             std: Some(false),
         },
diff --git a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs
index c373afb914e..71ffd8baed5 100644
--- a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs
+++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs
@@ -12,7 +12,7 @@ pub(crate) fn target() -> Target {
         llvm_target: "armebv7r-none-eabihf".into(),
         metadata: TargetMetadata {
             description: Some("Bare Armv7-R, Big Endian, hardfloat".into()),
-            tier: Some(2),
+            tier: Some(3),
             host_tools: Some(false),
             std: Some(false),
         },
diff --git a/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs
index e775c8fc524..a0d403bd05e 100644
--- a/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs
+++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs
@@ -1,4 +1,6 @@
-use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, RustcAbi, Target, TargetMetadata, base};
+use crate::spec::{
+    Cc, FramePointer, LinkerFlavor, Lld, RustcAbi, Target, TargetMetadata, base, crt_objects,
+};
 
 pub(crate) fn target() -> Target {
     let mut base = base::windows_gnu::opts();
@@ -15,6 +17,10 @@ pub(crate) fn target() -> Target {
         &["-m", "i386pe", "--large-address-aware"],
     );
     base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-Wl,--large-address-aware"]);
+    base.pre_link_objects = crt_objects::pre_i686_mingw();
+    base.post_link_objects = crt_objects::post_i686_mingw();
+    base.pre_link_objects_self_contained = crt_objects::pre_i686_mingw_self_contained();
+    base.post_link_objects_self_contained = crt_objects::post_i686_mingw_self_contained();
 
     Target {
         llvm_target: "i686-pc-windows-gnu".into(),
diff --git a/library/alloctests/tests/lib.rs b/library/alloctests/tests/lib.rs
index cba9883e148..49fb21ef5f3 100644
--- a/library/alloctests/tests/lib.rs
+++ b/library/alloctests/tests/lib.rs
@@ -47,7 +47,6 @@
 #![deny(unsafe_op_in_unsafe_fn)]
 
 extern crate alloc;
-extern crate test;
 
 use std::hash::{DefaultHasher, Hash, Hasher};
 
diff --git a/library/std/src/sys/pal/unix/stack_overflow.rs b/library/std/src/sys/pal/unix/stack_overflow.rs
index 0d2100d66bc..51463eef5b7 100644
--- a/library/std/src/sys/pal/unix/stack_overflow.rs
+++ b/library/std/src/sys/pal/unix/stack_overflow.rs
@@ -72,7 +72,7 @@ mod imp {
     use crate::sync::OnceLock;
     use crate::sync::atomic::{Atomic, AtomicBool, AtomicPtr, AtomicUsize, Ordering};
     use crate::sys::pal::unix::os;
-    use crate::{io, mem, panic, ptr};
+    use crate::{io, mem, ptr};
 
     // Signal handler for the SIGSEGV and SIGBUS handlers. We've got guard pages
     // (unmapped pages) at the end of every thread's stack, so if a thread ends
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index e699922f4dc..884b5750974 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -895,6 +895,8 @@ impl Step for StartupObjects {
     fn run(self, builder: &Builder<'_>) -> Vec<(PathBuf, DependencyType)> {
         let for_compiler = self.compiler;
         let target = self.target;
+        // Even though no longer necessary on x86_64, they are kept for now to
+        // avoid potential issues in downstream crates.
         if !target.is_windows_gnu() {
             return vec![];
         }
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index 99c8e365f5c..c0882a7a45e 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -156,8 +156,6 @@ target | std | notes
 `arm-unknown-linux-musleabi` | ✓ | Armv6 Linux with musl 1.2.3
 `arm-unknown-linux-musleabihf` | ✓ | Armv6 Linux with musl 1.2.3, hardfloat
 [`arm64ec-pc-windows-msvc`](platform-support/arm64ec-pc-windows-msvc.md) | ✓ | Arm64EC Windows MSVC
-[`armebv7r-none-eabi`](platform-support/armebv7r-none-eabi.md) | * | Bare Armv7-R, Big Endian
-[`armebv7r-none-eabihf`](platform-support/armebv7r-none-eabi.md) | * | Bare Armv7-R, Big Endian, hardfloat
 [`armv5te-unknown-linux-gnueabi`](platform-support/armv5te-unknown-linux-gnueabi.md) | ✓ | Armv5TE Linux (kernel 4.4+, glibc 2.23)
 `armv5te-unknown-linux-musleabi` | ✓ | Armv5TE Linux with musl 1.2.3
 [`armv7-linux-androideabi`](platform-support/android.md) | ✓ | Armv7-A Android
@@ -283,6 +281,8 @@ target | std | host | notes
 [`arm64e-apple-ios`](platform-support/arm64e-apple-ios.md) | ✓ | | ARM64e Apple iOS
 [`arm64e-apple-tvos`](platform-support/arm64e-apple-tvos.md)  | ✓ | | ARM64e Apple tvOS
 [`armeb-unknown-linux-gnueabi`](platform-support/armeb-unknown-linux-gnueabi.md) | ✓ | ? | Arm BE8 the default Arm big-endian architecture since [Armv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en).
+[`armebv7r-none-eabi`](platform-support/armebv7r-none-eabi.md) | * | Bare Armv7-R, Big Endian
+[`armebv7r-none-eabihf`](platform-support/armebv7r-none-eabi.md) | * | Bare Armv7-R, Big Endian, hardfloat
 [`armv4t-none-eabi`](platform-support/armv4t-none-eabi.md) | * |  | Bare Armv4T
 `armv4t-unknown-linux-gnueabi` | ? |  | Armv4T Linux
 [`armv5te-none-eabi`](platform-support/armv5te-none-eabi.md) | * |  | Bare Armv5TE
diff --git a/src/doc/rustc/src/platform-support/armebv7r-none-eabi.md b/src/doc/rustc/src/platform-support/armebv7r-none-eabi.md
index 3e90319c373..d5c676ea9a4 100644
--- a/src/doc/rustc/src/platform-support/armebv7r-none-eabi.md
+++ b/src/doc/rustc/src/platform-support/armebv7r-none-eabi.md
@@ -1,6 +1,6 @@
 # `armebv7r-none-eabi` and `armebv7r-none-eabihf`
 
-* **Tier: 2**
+* **Tier: 3**
 * **Library Support:** core and alloc (bare-metal, `#![no_std]`)
 
 Bare-metal target for CPUs in the Armv7-R architecture family running in Big
diff --git a/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md b/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md
index 5e785483402..b1495b2575e 100644
--- a/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md
+++ b/src/doc/rustdoc/src/write-documentation/linking-to-items-by-name.md
@@ -90,7 +90,7 @@ fn Foo() {}
 These prefixes will be stripped when displayed in the documentation, so `[struct@Foo]` will be
 rendered as `Foo`. The following prefixes are available: `struct`, `enum`, `trait`, `union`,
 `mod`, `module`, `const`, `constant`, `fn`, `function`, `field`, `variant`, `method`, `derive`,
-`type`, `value`, `macro`, `prim` or `primitive`.
+`type`, `value`, `macro`, `tyalias`, `typealias`, `prim` or `primitive`.
 
 You can also disambiguate for functions by adding `()` after the function name,
 or for macros by adding `!` after the macro name. The macro `!` can be followed by `()`, `{}`,
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index 0da42f38251..79d74c3c4eb 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -130,6 +130,7 @@ impl Res {
             DefKind::Static { .. } => "static",
             DefKind::Field => "field",
             DefKind::Variant | DefKind::Ctor(..) => "variant",
+            DefKind::TyAlias => "tyalias",
             // Now handle things that don't have a specific disambiguator
             _ => match kind
                 .ns()
@@ -1708,6 +1709,7 @@ impl Disambiguator {
                 "value" => NS(Namespace::ValueNS),
                 "macro" => NS(Namespace::MacroNS),
                 "prim" | "primitive" => Primitive,
+                "tyalias" | "typealias" => Kind(DefKind::TyAlias),
                 _ => return Err((format!("unknown disambiguator `{prefix}`"), 0..idx)),
             };
 
diff --git a/src/tools/clippy/tests/ui/useless_attribute.fixed b/src/tools/clippy/tests/ui/useless_attribute.fixed
index 15070dd9c2c..e0bc23e0788 100644
--- a/src/tools/clippy/tests/ui/useless_attribute.fixed
+++ b/src/tools/clippy/tests/ui/useless_attribute.fixed
@@ -153,7 +153,7 @@ pub mod redundant_imports_issue {
         () => {};
     }
 
-    #[expect(redundant_imports)]
+    #[expect(unused_imports)]
     pub(crate) use empty;
 
     empty!();
diff --git a/src/tools/clippy/tests/ui/useless_attribute.rs b/src/tools/clippy/tests/ui/useless_attribute.rs
index 3f530de7fd8..30a4c354b23 100644
--- a/src/tools/clippy/tests/ui/useless_attribute.rs
+++ b/src/tools/clippy/tests/ui/useless_attribute.rs
@@ -153,7 +153,7 @@ pub mod redundant_imports_issue {
         () => {};
     }
 
-    #[expect(redundant_imports)]
+    #[expect(unused_imports)]
     pub(crate) use empty;
 
     empty!();
diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/builtin/derive_macro.rs b/src/tools/rust-analyzer/crates/hir-expand/src/builtin/derive_macro.rs
index 15e68ff95cd..0fa412ad7fa 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/src/builtin/derive_macro.rs
+++ b/src/tools/rust-analyzer/crates/hir-expand/src/builtin/derive_macro.rs
@@ -12,7 +12,7 @@ use tracing::debug;
 
 use crate::{
     ExpandError, ExpandResult, MacroCallId,
-    builtin::quote::{dollar_crate, quote},
+    builtin::quote::dollar_crate,
     db::ExpandDatabase,
     hygiene::span_with_def_site_ctxt,
     name::{self, AsName, Name},
diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/builtin/fn_macro.rs b/src/tools/rust-analyzer/crates/hir-expand/src/builtin/fn_macro.rs
index ec344613761..6fe63f249cd 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/src/builtin/fn_macro.rs
+++ b/src/tools/rust-analyzer/crates/hir-expand/src/builtin/fn_macro.rs
@@ -19,7 +19,7 @@ use syntax_bridge::syntax_node_to_token_tree;
 
 use crate::{
     EditionedFileId, ExpandError, ExpandResult, Lookup as _, MacroCallId,
-    builtin::quote::{WithDelimiter, dollar_crate, quote},
+    builtin::quote::{WithDelimiter, dollar_crate},
     db::ExpandDatabase,
     hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt},
     name,
diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/builtin/quote.rs b/src/tools/rust-analyzer/crates/hir-expand/src/builtin/quote.rs
index 70c38d4d7c7..84dd4a24d90 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/src/builtin/quote.rs
+++ b/src/tools/rust-analyzer/crates/hir-expand/src/builtin/quote.rs
@@ -229,8 +229,6 @@ mod tests {
     use span::{Edition, ROOT_ERASED_FILE_AST_ID, SpanAnchor, SyntaxContext};
     use syntax::{TextRange, TextSize};
 
-    use super::quote;
-
     const DUMMY: tt::Span = tt::Span {
         range: TextRange::empty(TextSize::new(0)),
         anchor: SpanAnchor {
diff --git a/src/tools/rustfmt/src/config/mod.rs b/src/tools/rustfmt/src/config/mod.rs
index 6b63108c037..525953bf445 100644
--- a/src/tools/rustfmt/src/config/mod.rs
+++ b/src/tools/rustfmt/src/config/mod.rs
@@ -516,7 +516,6 @@ mod test {
     #[allow(dead_code)]
     mod mock {
         use super::super::*;
-        use crate::config_option_with_style_edition_default;
         use rustfmt_config_proc_macro::config_type;
 
         #[config_type]
diff --git a/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs
new file mode 100644
index 00000000000..c4527c626d9
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs
@@ -0,0 +1,21 @@
+// Ensure that no warning is emitted if the disambiguator is used for type alias.
+// Regression test for <https://github.com/rust-lang/rust/issues/146855>.
+
+#![deny(rustdoc::broken_intra_doc_links)]
+
+pub struct Foo;
+
+#[allow(non_camel_case_types)]
+pub type f32 = Foo;
+
+/// This function returns [`f32`].
+//~^ ERROR: `f32` is both a type alias and a primitive type
+//~| HELP: to link to the type alias, prefix with `tyalias@`
+//~| HELP: to link to the primitive type, prefix with `prim@`
+pub fn my_fn() -> f32 {}
+
+/// This function returns [type@f32].
+//~^ ERROR: `f32` is both a type alias and a primitive type
+//~| HELP: to link to the type alias, prefix with `tyalias@`
+//~| HELP: to link to the primitive type, prefix with `prim@`
+pub fn my_fn2() -> f32 {}
diff --git a/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr
new file mode 100644
index 00000000000..c99e7d1d104
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr
@@ -0,0 +1,39 @@
+error: `f32` is both a type alias and a primitive type
+  --> $DIR/type-alias-primitive-suggestion.rs:11:29
+   |
+LL | /// This function returns [`f32`].
+   |                             ^^^ ambiguous link
+   |
+note: the lint level is defined here
+  --> $DIR/type-alias-primitive-suggestion.rs:4:9
+   |
+LL | #![deny(rustdoc::broken_intra_doc_links)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: to link to the type alias, prefix with `tyalias@`
+   |
+LL | /// This function returns [`tyalias@f32`].
+   |                             ++++++++
+help: to link to the primitive type, prefix with `prim@`
+   |
+LL | /// This function returns [`prim@f32`].
+   |                             +++++
+
+error: `f32` is both a type alias and a primitive type
+  --> $DIR/type-alias-primitive-suggestion.rs:17:28
+   |
+LL | /// This function returns [type@f32].
+   |                            ^^^^^^^^ ambiguous link
+   |
+help: to link to the type alias, prefix with `tyalias@`
+   |
+LL - /// This function returns [type@f32].
+LL + /// This function returns [tyalias@f32].
+   |
+help: to link to the primitive type, prefix with `prim@`
+   |
+LL - /// This function returns [type@f32].
+LL + /// This function returns [prim@f32].
+   |
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/rustdoc-ui/intra-doc/type-alias-primitive.rs b/tests/rustdoc-ui/intra-doc/type-alias-primitive.rs
new file mode 100644
index 00000000000..62b2c83eeca
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/type-alias-primitive.rs
@@ -0,0 +1,14 @@
+// Ensure that no warning is emitted if the disambiguator is used for type alias.
+// Regression test for <https://github.com/rust-lang/rust/issues/146855>.
+
+//@ check-pass
+
+#![deny(rustdoc::broken_intra_doc_links)]
+
+pub struct Foo;
+
+#[allow(non_camel_case_types)]
+pub type f32 = Foo;
+
+/// This function returns [`tyalias@f32`] and not [`prim@f32`].
+pub fn my_fn() -> f32 {}
diff --git a/tests/rustdoc/intra-doc/type-alias-primitive.rs b/tests/rustdoc/intra-doc/type-alias-primitive.rs
new file mode 100644
index 00000000000..7504166cbcc
--- /dev/null
+++ b/tests/rustdoc/intra-doc/type-alias-primitive.rs
@@ -0,0 +1,21 @@
+// Ensure that no warning is emitted if the disambiguator is used for type alias.
+// Regression test for <https://github.com/rust-lang/rust/issues/146855>.
+
+#![crate_name = "foo"]
+#![deny(rustdoc::broken_intra_doc_links)]
+
+pub struct Foo;
+
+#[allow(non_camel_case_types)]
+pub type f32 = Foo;
+
+/// This function returns [`tyalias@f32`] and not [bla][`prim@f32`].
+//@ has 'foo/fn.my_fn.html'
+//@ has - '//a[@href="type.f32.html"]' "f32"
+//@ has - '//a[@href="{{channel}}/std/primitive.f32.html"]' "bla"
+pub fn my_fn() -> f32 { 0. }
+
+/// This function returns [`typealias@f32`].
+//@ has 'foo/fn.my_other_fn.html'
+//@ has - '//a[@href="type.f32.html"]' "f32"
+pub fn my_other_fn() -> f32 { 0. }
diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
index c7c05946c4c..5f4e381c983 100644
--- a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
+++ b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![allow(overflowing_literals)]
 
diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
index 98175a26ec0..ea37d3e7212 100644
--- a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
+++ b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![allow(overflowing_literals)]
 
diff --git a/tests/ui/array-slice-vec/nested-vec-3.rs b/tests/ui/array-slice-vec/nested-vec-3.rs
index 51975743742..e3c04ed6f6b 100644
--- a/tests/ui/array-slice-vec/nested-vec-3.rs
+++ b/tests/ui/array-slice-vec/nested-vec-3.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![allow(overflowing_literals)]
 
diff --git a/tests/ui/array-slice-vec/slice-panic-1.rs b/tests/ui/array-slice-vec/slice-panic-1.rs
index a745dff96af..d7c1098fa2b 100644
--- a/tests/ui/array-slice-vec/slice-panic-1.rs
+++ b/tests/ui/array-slice-vec/slice-panic-1.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Test that if a slicing expr[..] fails, the correct cleanups happen.
 
diff --git a/tests/ui/array-slice-vec/slice-panic-2.rs b/tests/ui/array-slice-vec/slice-panic-2.rs
index 483a4cbe245..157e716a95d 100644
--- a/tests/ui/array-slice-vec/slice-panic-2.rs
+++ b/tests/ui/array-slice-vec/slice-panic-2.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Test that if a slicing expr[..] fails, the correct cleanups happen.
 
diff --git a/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs b/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
index aef25d057d4..94dab4235e0 100644
--- a/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
+++ b/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
@@ -18,6 +18,7 @@
 
 //@ build-pass
 //@ needs-asm-support
+//@ ignore-backends: gcc
 
 use std::arch::global_asm;
 
diff --git a/tests/ui/asm/x86_64/goto.rs b/tests/ui/asm/x86_64/goto.rs
index 00a8e588f96..c1dbce0d1c9 100644
--- a/tests/ui/asm/x86_64/goto.rs
+++ b/tests/ui/asm/x86_64/goto.rs
@@ -1,6 +1,7 @@
 //@ only-x86_64
 //@ run-pass
 //@ needs-asm-support
+//@ ignore-backends: gcc
 
 #![deny(unreachable_code)]
 #![feature(asm_goto_with_outputs)]
diff --git a/tests/ui/asm/x86_64/goto.stderr b/tests/ui/asm/x86_64/goto.stderr
index 78b726b3f3d..f8f09f32f6c 100644
--- a/tests/ui/asm/x86_64/goto.stderr
+++ b/tests/ui/asm/x86_64/goto.stderr
@@ -1,5 +1,5 @@
 warning: unreachable statement
-  --> $DIR/goto.rs:143:9
+  --> $DIR/goto.rs:144:9
    |
 LL | /         asm!(
 LL | |             "jmp {}",
@@ -13,7 +13,7 @@ LL |           unreachable!();
    |           ^^^^^^^^^^^^^^ unreachable statement
    |
 note: the lint level is defined here
-  --> $DIR/goto.rs:133:8
+  --> $DIR/goto.rs:134:8
    |
 LL | #[warn(unreachable_code)]
    |        ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/asm/x86_64/srcloc.rs b/tests/ui/asm/x86_64/srcloc.rs
index 2938bafe5e7..f4ffa8c5c3b 100644
--- a/tests/ui/asm/x86_64/srcloc.rs
+++ b/tests/ui/asm/x86_64/srcloc.rs
@@ -1,6 +1,7 @@
 //@ only-x86_64
 //@ build-fail
 //@ compile-flags: -Ccodegen-units=1
+//@ ignore-backends: gcc
 
 use std::arch::asm;
 
diff --git a/tests/ui/asm/x86_64/srcloc.stderr b/tests/ui/asm/x86_64/srcloc.stderr
index bb4e855163d..b2079120ec0 100644
--- a/tests/ui/asm/x86_64/srcloc.stderr
+++ b/tests/ui/asm/x86_64/srcloc.stderr
@@ -1,5 +1,5 @@
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:11:15
+  --> $DIR/srcloc.rs:12:15
    |
 LL |         asm!("invalid_instruction");
    |               ^^^^^^^^^^^^^^^^^^^
@@ -11,7 +11,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:15:13
+  --> $DIR/srcloc.rs:16:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:20:13
+  --> $DIR/srcloc.rs:21:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -35,7 +35,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:26:13
+  --> $DIR/srcloc.rs:27:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -47,7 +47,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:33:13
+  --> $DIR/srcloc.rs:34:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:38:14
+  --> $DIR/srcloc.rs:39:14
    |
 LL |         asm!(concat!("invalid", "_", "instruction"));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -71,7 +71,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 warning: scale factor without index register is ignored
-  --> $DIR/srcloc.rs:41:15
+  --> $DIR/srcloc.rs:42:15
    |
 LL |         asm!("movaps %xmm3, (%esi, 2)", options(att_syntax));
    |               ^^^^^^^^^^^^^^^^^^^^^^^
@@ -83,7 +83,7 @@ LL |     movaps %xmm3, (%esi, 2)
    |                          ^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:45:14
+  --> $DIR/srcloc.rs:46:14
    |
 LL |             "invalid_instruction",
    |              ^^^^^^^^^^^^^^^^^^^
@@ -95,7 +95,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:51:14
+  --> $DIR/srcloc.rs:52:14
    |
 LL |             "invalid_instruction",
    |              ^^^^^^^^^^^^^^^^^^^
@@ -107,7 +107,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:58:14
+  --> $DIR/srcloc.rs:59:14
    |
 LL |             "invalid_instruction",
    |              ^^^^^^^^^^^^^^^^^^^
@@ -119,7 +119,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:65:13
+  --> $DIR/srcloc.rs:66:13
    |
 LL |             concat!("invalid", "_", "instruction"),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -131,7 +131,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:72:13
+  --> $DIR/srcloc.rs:73:13
    |
 LL |             concat!("invalid", "_", "instruction"),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -143,7 +143,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:79:14
+  --> $DIR/srcloc.rs:80:14
    |
 LL |             "invalid_instruction1",
    |              ^^^^^^^^^^^^^^^^^^^^
@@ -155,7 +155,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:80:14
+  --> $DIR/srcloc.rs:81:14
    |
 LL |             "invalid_instruction2",
    |              ^^^^^^^^^^^^^^^^^^^^
@@ -167,7 +167,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:86:13
+  --> $DIR/srcloc.rs:87:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -182,7 +182,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:86:13
+  --> $DIR/srcloc.rs:87:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -197,7 +197,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:95:13
+  --> $DIR/srcloc.rs:96:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -212,7 +212,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:95:13
+  --> $DIR/srcloc.rs:96:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -227,7 +227,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction3'
-  --> $DIR/srcloc.rs:99:13
+  --> $DIR/srcloc.rs:100:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -242,7 +242,7 @@ LL | invalid_instruction3
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction4'
-  --> $DIR/srcloc.rs:99:13
+  --> $DIR/srcloc.rs:100:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -257,7 +257,7 @@ LL | invalid_instruction4
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:110:13
+  --> $DIR/srcloc.rs:111:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -272,7 +272,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:110:13
+  --> $DIR/srcloc.rs:111:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -287,7 +287,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction3'
-  --> $DIR/srcloc.rs:114:13
+  --> $DIR/srcloc.rs:115:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -302,7 +302,7 @@ LL | invalid_instruction3
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction4'
-  --> $DIR/srcloc.rs:114:13
+  --> $DIR/srcloc.rs:115:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -317,7 +317,7 @@ LL | invalid_instruction4
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:127:14
+  --> $DIR/srcloc.rs:128:14
    |
 LL |             "invalid_instruction"
    |              ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/attributes/fn-align-dyn.rs b/tests/ui/attributes/fn-align-dyn.rs
index 3778c75a2ca..91e2dab65a3 100644
--- a/tests/ui/attributes/fn-align-dyn.rs
+++ b/tests/ui/attributes/fn-align-dyn.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368)
+//@ ignore-backends: gcc
 
 // FIXME(#82232, #143834): temporarily renamed to mitigate `#[align]` nameres ambiguity
 #![feature(rustc_attrs)]
diff --git a/tests/ui/attributes/main-removed-2/main.rs b/tests/ui/attributes/main-removed-2/main.rs
index 53696d68ced..21a05dc4b40 100644
--- a/tests/ui/attributes/main-removed-2/main.rs
+++ b/tests/ui/attributes/main-removed-2/main.rs
@@ -2,6 +2,7 @@
 //@ proc-macro: tokyo.rs
 //@ compile-flags:--extern tokyo
 //@ edition:2021
+//@ ignore-backends: gcc
 
 use tokyo::main;
 
diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs
index e30479b03b1..820484aa015 100644
--- a/tests/ui/attributes/malformed-attrs.rs
+++ b/tests/ui/attributes/malformed-attrs.rs
@@ -185,8 +185,7 @@ extern "C" {
 #[forbid]
 //~^ ERROR malformed
 #[debugger_visualizer]
-//~^ ERROR invalid argument
-//~| ERROR malformed `debugger_visualizer` attribute input
+//~^ ERROR malformed `debugger_visualizer` attribute input
 #[automatically_derived = 18]
 //~^ ERROR malformed
 mod yooo {
diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr
index 246029ecf80..70ab3fb13c4 100644
--- a/tests/ui/attributes/malformed-attrs.stderr
+++ b/tests/ui/attributes/malformed-attrs.stderr
@@ -22,7 +22,7 @@ LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
    |           ++++++++++++++++++++++++++++++++++++++++++++
 
 error[E0463]: can't find crate for `wloop`
-  --> $DIR/malformed-attrs.rs:210:1
+  --> $DIR/malformed-attrs.rs:209:1
    |
 LL | extern crate wloop;
    | ^^^^^^^^^^^^^^^^^^^ can't find crate
@@ -156,22 +156,14 @@ LL | #[forbid(lint1, lint2, ...)]
 LL | #[forbid(lint1, lint2, lint3, reason = "...")]
    |         +++++++++++++++++++++++++++++++++++++
 
-error: malformed `debugger_visualizer` attribute input
-  --> $DIR/malformed-attrs.rs:187:1
-   |
-LL | #[debugger_visualizer]
-   | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
-   |
-   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute>
-
 error: malformed `thread_local` attribute input
-  --> $DIR/malformed-attrs.rs:202:1
+  --> $DIR/malformed-attrs.rs:201:1
    |
 LL | #[thread_local()]
    | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]`
 
 error: malformed `no_link` attribute input
-  --> $DIR/malformed-attrs.rs:206:1
+  --> $DIR/malformed-attrs.rs:205:1
    |
 LL | #[no_link()]
    | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
@@ -197,7 +189,7 @@ LL | #[proc_macro_derive]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
-  --> $DIR/malformed-attrs.rs:215:1
+  --> $DIR/malformed-attrs.rs:214:1
    |
 LL | #[allow_internal_unsafe = 1]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -226,16 +218,6 @@ LL | #[doc]
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
    = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
 
-error: invalid argument
-  --> $DIR/malformed-attrs.rs:187:1
-   |
-LL | #[debugger_visualizer]
-   | ^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: expected: `natvis_file = "..."`
-   = note: OR
-   = note: expected: `gdb_script_file = "..."`
-
 error[E0539]: malformed `export_name` attribute input
   --> $DIR/malformed-attrs.rs:29:1
    |
@@ -685,8 +667,19 @@ LL |     #[linkage = "external"]
    |               ++++++++++++
    = and 5 other candidates
 
+error[E0539]: malformed `debugger_visualizer` attribute input
+  --> $DIR/malformed-attrs.rs:187:1
+   |
+LL | #[debugger_visualizer]
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute>
+
 error[E0565]: malformed `automatically_derived` attribute input
-  --> $DIR/malformed-attrs.rs:190:1
+  --> $DIR/malformed-attrs.rs:189:1
    |
 LL | #[automatically_derived = 18]
    | ^^^^^^^^^^^^^^^^^^^^^^^^----^
@@ -695,7 +688,7 @@ LL | #[automatically_derived = 18]
    | help: must be of the form: `#[automatically_derived]`
 
 error[E0565]: malformed `non_exhaustive` attribute input
-  --> $DIR/malformed-attrs.rs:196:1
+  --> $DIR/malformed-attrs.rs:195:1
    |
 LL | #[non_exhaustive = 1]
    | ^^^^^^^^^^^^^^^^^---^
@@ -704,19 +697,19 @@ LL | #[non_exhaustive = 1]
    | help: must be of the form: `#[non_exhaustive]`
 
 error: valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
-  --> $DIR/malformed-attrs.rs:208:1
+  --> $DIR/malformed-attrs.rs:207:1
    |
 LL | #[macro_use = 1]
    | ^^^^^^^^^^^^^^^^
 
 error: valid forms for the attribute are `#![macro_export(local_inner_macros)]` and `#![macro_export]`
-  --> $DIR/malformed-attrs.rs:213:1
+  --> $DIR/malformed-attrs.rs:212:1
    |
 LL | #[macro_export = 18]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0565]: malformed `allow_internal_unsafe` attribute input
-  --> $DIR/malformed-attrs.rs:215:1
+  --> $DIR/malformed-attrs.rs:214:1
    |
 LL | #[allow_internal_unsafe = 1]
    | ^^^^^^^^^^^^^^^^^^^^^^^^---^
@@ -800,7 +793,7 @@ LL | #[ignore()]
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
 
 error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
-  --> $DIR/malformed-attrs.rs:222:1
+  --> $DIR/malformed-attrs.rs:221:1
    |
 LL | #[ignore = 1]
    | ^^^^^^^^^^^^^
@@ -819,7 +812,7 @@ LL |     #[coroutine = 63] || {}
    = note: expected unit type `()`
               found coroutine `{coroutine@$DIR/malformed-attrs.rs:110:23: 110:25}`
 
-error: aborting due to 77 previous errors; 3 warnings emitted
+error: aborting due to 76 previous errors; 3 warnings emitted
 
 Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
 For more information about an error, try `rustc --explain E0308`.
@@ -871,7 +864,7 @@ LL | #[ignore()]
 
 Future breakage diagnostic:
 error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
-  --> $DIR/malformed-attrs.rs:222:1
+  --> $DIR/malformed-attrs.rs:221:1
    |
 LL | #[ignore = 1]
    | ^^^^^^^^^^^^^
diff --git a/tests/ui/backtrace/synchronized-panic-handler.rs b/tests/ui/backtrace/synchronized-panic-handler.rs
index 29431ae3c45..ef7cc1faec8 100644
--- a/tests/ui/backtrace/synchronized-panic-handler.rs
+++ b/tests/ui/backtrace/synchronized-panic-handler.rs
@@ -4,6 +4,7 @@
 //@ exec-env:RUST_BACKTRACE=0
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 use std::thread;
 const PANIC_MESSAGE: &str = "oops oh no woe is me";
 
diff --git a/tests/ui/backtrace/synchronized-panic-handler.run.stderr b/tests/ui/backtrace/synchronized-panic-handler.run.stderr
index c604d49c193..5296a0d39ff 100644
--- a/tests/ui/backtrace/synchronized-panic-handler.run.stderr
+++ b/tests/ui/backtrace/synchronized-panic-handler.run.stderr
@@ -1,7 +1,7 @@
 
-thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5:
+thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:12:5:
 oops oh no woe is me
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5:
+thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:12:5:
 oops oh no woe is me
diff --git a/tests/ui/box/unit/unwind-unique.rs b/tests/ui/box/unit/unwind-unique.rs
index 1da55c45ee9..ed549f50a74 100644
--- a/tests/ui/box/unit/unwind-unique.rs
+++ b/tests/ui/box/unit/unwind-unique.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/c-variadic/inherent-method.rs b/tests/ui/c-variadic/inherent-method.rs
index 537bae7b3f0..c5256aaa1fe 100644
--- a/tests/ui/c-variadic/inherent-method.rs
+++ b/tests/ui/c-variadic/inherent-method.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![feature(c_variadic)]
 
 #[repr(transparent)]
diff --git a/tests/ui/c-variadic/trait-method.rs b/tests/ui/c-variadic/trait-method.rs
index 97da0706a3a..876a303f53b 100644
--- a/tests/ui/c-variadic/trait-method.rs
+++ b/tests/ui/c-variadic/trait-method.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![feature(c_variadic)]
 
 #[repr(transparent)]
diff --git a/tests/ui/c-variadic/valid.rs b/tests/ui/c-variadic/valid.rs
index 5a0b32026dc..8b42eb49329 100644
--- a/tests/ui/c-variadic/valid.rs
+++ b/tests/ui/c-variadic/valid.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![feature(c_variadic)]
 
 // In rust (and C23 and above) `...` can be the only argument.
diff --git a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs
index cafb7389e29..2ca004d9a90 100644
--- a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs
+++ b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs
@@ -2,6 +2,7 @@
 //@ proc-macro: ver-cfg-rel.rs
 //@ revisions: assume no_assume
 //@ [assume]compile-flags: -Z assume-incomplete-release
+//@ ignore-backends: gcc
 
 #![feature(cfg_version)]
 
diff --git a/tests/ui/codegen/issue-82833-slice-miscompile.rs b/tests/ui/codegen/issue-82833-slice-miscompile.rs
index 32eac923a63..e0cb8716629 100644
--- a/tests/ui/codegen/issue-82833-slice-miscompile.rs
+++ b/tests/ui/codegen/issue-82833-slice-miscompile.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ compile-flags: -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2
+//@ ignore-backends: gcc
 
 // Make sure LLVM does not miscompile this.
 
diff --git a/tests/ui/codegen/llvm-args-invalid-flag.rs b/tests/ui/codegen/llvm-args-invalid-flag.rs
index a8fa55a220a..f88a7101abd 100644
--- a/tests/ui/codegen/llvm-args-invalid-flag.rs
+++ b/tests/ui/codegen/llvm-args-invalid-flag.rs
@@ -1,6 +1,7 @@
 //@ compile-flags: -Cllvm-args=-not-a-real-llvm-arg
 //@ normalize-stderr: "--help" -> "-help"
 //@ normalize-stderr: "\n(\n|.)*" -> ""
+//@ ignore-backends: gcc
 
 // I'm seeing "--help" locally, but "-help" in CI, so I'm normalizing it to just "-help".
 
diff --git a/tests/ui/codegen/remark-flag-functionality.rs b/tests/ui/codegen/remark-flag-functionality.rs
index 797c55ba830..4cfc5f5c8ec 100644
--- a/tests/ui/codegen/remark-flag-functionality.rs
+++ b/tests/ui/codegen/remark-flag-functionality.rs
@@ -17,6 +17,7 @@
 
 //@ dont-check-compiler-stderr
 //@ dont-require-annotations: NOTE
+//@ ignore-backends: gcc
 
 #[no_mangle]
 #[inline(never)]
diff --git a/tests/ui/codegen/virtual-function-elimination.rs b/tests/ui/codegen/virtual-function-elimination.rs
index 3cbeb1293e5..90fc86f95c5 100644
--- a/tests/ui/codegen/virtual-function-elimination.rs
+++ b/tests/ui/codegen/virtual-function-elimination.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: -Zvirtual-function-elimination=true -Clto=true
 //@ only-x86_64
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 // issue #123955
 pub fn test0() {
diff --git a/tests/ui/coroutine/gen_block_panic.rs b/tests/ui/coroutine/gen_block_panic.rs
index b6362d5046a..5417ed583e8 100644
--- a/tests/ui/coroutine/gen_block_panic.rs
+++ b/tests/ui/coroutine/gen_block_panic.rs
@@ -1,6 +1,7 @@
 //@ edition: 2024
 //@ run-pass
 //@ needs-unwind
+//@ ignore-backends: gcc
 #![feature(gen_blocks)]
 
 fn main() {
diff --git a/tests/ui/coroutine/gen_block_panic.stderr b/tests/ui/coroutine/gen_block_panic.stderr
index a43c9e03691..d0a146e7baf 100644
--- a/tests/ui/coroutine/gen_block_panic.stderr
+++ b/tests/ui/coroutine/gen_block_panic.stderr
@@ -1,5 +1,5 @@
 warning: unreachable statement
-  --> $DIR/gen_block_panic.rs:10:9
+  --> $DIR/gen_block_panic.rs:11:9
    |
 LL |         panic!("foo");
    |         ------------- any code following this expression is unreachable
diff --git a/tests/ui/delegation/fn-header-variadic.rs b/tests/ui/delegation/fn-header-variadic.rs
index 2c83d64d0b3..346c49f08e5 100644
--- a/tests/ui/delegation/fn-header-variadic.rs
+++ b/tests/ui/delegation/fn-header-variadic.rs
@@ -1,4 +1,5 @@
 //@ aux-crate:fn_header_aux=fn-header-aux.rs
+//@ ignore-backends: gcc
 
 #![feature(c_variadic)]
 #![feature(fn_delegation)]
diff --git a/tests/ui/delegation/fn-header-variadic.stderr b/tests/ui/delegation/fn-header-variadic.stderr
index 688a965fb4d..c2d7672939f 100644
--- a/tests/ui/delegation/fn-header-variadic.stderr
+++ b/tests/ui/delegation/fn-header-variadic.stderr
@@ -1,5 +1,5 @@
 error: delegation to C-variadic functions is not allowed
-  --> $DIR/fn-header-variadic.rs:11:17
+  --> $DIR/fn-header-variadic.rs:12:17
    |
 LL |     pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {}
    |     ------------------------------------------------------------- callee defined here
@@ -8,7 +8,7 @@ LL | reuse to_reuse::variadic_fn;
    |                 ^^^^^^^^^^^
 
 error: delegation to C-variadic functions is not allowed
-  --> $DIR/fn-header-variadic.rs:13:22
+  --> $DIR/fn-header-variadic.rs:14:22
    |
 LL | reuse fn_header_aux::variadic_fn_extern;
    |                      ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/drop/drop-trait-enum.rs b/tests/ui/drop/drop-trait-enum.rs
index 5a88d959ec6..efb6b2a912a 100644
--- a/tests/ui/drop/drop-trait-enum.rs
+++ b/tests/ui/drop/drop-trait-enum.rs
@@ -4,6 +4,7 @@
 #![allow(unused_variables)]
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 use std::thread;
 use std::sync::mpsc::{channel, Sender};
diff --git a/tests/ui/drop/terminate-in-initializer.rs b/tests/ui/drop/terminate-in-initializer.rs
index 24ec39fe096..5dd8fe43c71 100644
--- a/tests/ui/drop/terminate-in-initializer.rs
+++ b/tests/ui/drop/terminate-in-initializer.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Issue #787
 // Don't try to clean up uninitialized locals
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
index b85b335844b..1246a3801fc 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ ignore-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr b/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr
index e1a251d156f..020a0542a57 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr
@@ -1,5 +1,5 @@
 warning: tail calling a function marked with `#[track_caller]` has no special effect
-  --> $DIR/callee_is_track_caller.rs:7:12
+  --> $DIR/callee_is_track_caller.rs:8:12
    |
 LL |     become b(x);
    |            ^^^^
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs
index 33384de83eb..51688897b40 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ ignore-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr
index 5a1c40509ad..7b4c144acff 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr
@@ -1,5 +1,5 @@
 warning: tail calling a function marked with `#[track_caller]` has no special effect
-  --> $DIR/callee_is_track_caller_polymorphic.rs:7:12
+  --> $DIR/callee_is_track_caller_polymorphic.rs:8:12
    |
 LL |     become T::f();
    |            ^^^^^^
diff --git a/tests/ui/explicit-tail-calls/drop-order.rs b/tests/ui/explicit-tail-calls/drop-order.rs
index 58e1afbdf0c..ff6e2f09f57 100644
--- a/tests/ui/explicit-tail-calls/drop-order.rs
+++ b/tests/ui/explicit-tail-calls/drop-order.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 use std::cell::RefCell;
diff --git a/tests/ui/explicit-tail-calls/indexer.rs b/tests/ui/explicit-tail-calls/indexer.rs
index 5644506b2f5..c26d9774ce7 100644
--- a/tests/ui/explicit-tail-calls/indexer.rs
+++ b/tests/ui/explicit-tail-calls/indexer.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 // Indexing taken from
 // https://github.com/phi-go/rfcs/blob/guaranteed-tco/text%2F0000-explicit-tail-calls.md#tail-call-elimination
 // no other test has utilized the "function table"
diff --git a/tests/ui/explicit-tail-calls/recursion-etc.rs b/tests/ui/explicit-tail-calls/recursion-etc.rs
index 8c89ceb7869..c22401d2379 100644
--- a/tests/ui/explicit-tail-calls/recursion-etc.rs
+++ b/tests/ui/explicit-tail-calls/recursion-etc.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 
diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs
index 035f063cd50..7a5f36da209 100644
--- a/tests/ui/extern/extern-types-field-offset.rs
+++ b/tests/ui/extern/extern-types-field-offset.rs
@@ -2,6 +2,7 @@
 //@ check-run-results
 //@ exec-env:RUST_BACKTRACE=0
 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
+//@ ignore-backends: gcc
 #![feature(extern_types)]
 
 extern "C" {
diff --git a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
index 1cd52b70315..4d0afa1cdfa 100644
--- a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
+++ b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
@@ -21,6 +21,7 @@
 //@[no]compile-flags: -C lto=no
 //@[thin]compile-flags: -C lto=thin
 //@[fat]compile-flags: -C lto=fat
+//@ ignore-backends: gcc
 
 #![feature(panic_internals)]
 
diff --git a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs
index a44eb3828d0..1fc3409c1f9 100644
--- a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs
+++ b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs
@@ -48,6 +48,7 @@
 //@[fat1]compile-flags: -C opt-level=1 -C lto=fat
 //@[fat2]compile-flags: -C opt-level=2 -C lto=fat
 //@[fat3]compile-flags: -C opt-level=3 -C lto=fat
+//@ ignore-backends: gcc
 
 fn main() {
     use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs
index 26d483e43ae..794b51c7a8a 100644
--- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs
+++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: format-string-proc-macro.rs
+//@ ignore-backends: gcc
 
 extern crate format_string_proc_macro;
 
diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
index e7ed2a76e6a..c341c6ee4c5 100644
--- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
+++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
@@ -1,5 +1,5 @@
 error: there is no argument named `x`
-  --> $DIR/format-args-capture-from-pm-first-arg-macro.rs:6:5
+  --> $DIR/format-args-capture-from-pm-first-arg-macro.rs:7:5
    |
 LL |     format_string_proc_macro::bad_format_args_captures!();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/frontmatter/proc-macro-observer.rs b/tests/ui/frontmatter/proc-macro-observer.rs
index 6c4c8c57289..5237a0e982a 100644
--- a/tests/ui/frontmatter/proc-macro-observer.rs
+++ b/tests/ui/frontmatter/proc-macro-observer.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ proc-macro: makro.rs
 //@ edition: 2021
+//@ ignore-backends: gcc
 
 // Check that a proc-macro doesn't try to parse frontmatter and instead treats
 // it as a regular Rust token sequence. See `auxiliary/makro.rs` for details.
diff --git a/tests/ui/hygiene/issue-77523-def-site-async-await.rs b/tests/ui/hygiene/issue-77523-def-site-async-await.rs
index ad6bd5e0b78..0a279682b71 100644
--- a/tests/ui/hygiene/issue-77523-def-site-async-await.rs
+++ b/tests/ui/hygiene/issue-77523-def-site-async-await.rs
@@ -1,5 +1,6 @@
 //@ build-pass
 //@ aux-build:def-site-async-await.rs
+//@ ignore-backends: gcc
 
 // Regression test for issue #77523
 // Tests that we don't ICE when an unusual combination
diff --git a/tests/ui/impl-trait/precise-capturing/external-macro.rs b/tests/ui/impl-trait/precise-capturing/external-macro.rs
index 9d4d8a1bb11..1342ecd58dc 100644
--- a/tests/ui/impl-trait/precise-capturing/external-macro.rs
+++ b/tests/ui/impl-trait/precise-capturing/external-macro.rs
@@ -6,6 +6,7 @@
 //@ aux-crate: no_use_macro=no-use-macro.rs
 //@ edition: 2024
 //@ check-pass
+//@ ignore-backends: gcc
 
 no_use_pm::pm_rpit!{}
 
diff --git a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
index 832821c9c88..2ed0014f8b0 100644
--- a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
+++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
@@ -1,5 +1,6 @@
 //@ build-fail
 //@ compile-flags: -Cpasses=unknown-pass
+//@ ignore-backends: gcc
 
 fn main() {}
 
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.rs b/tests/ui/invalid/invalid-debugger-visualizer-option.rs
index 0f1cf15a687..166962866dc 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-option.rs
+++ b/tests/ui/invalid/invalid-debugger-visualizer-option.rs
@@ -1,6 +1,6 @@
 //@ normalize-stderr: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG ("
 //@ normalize-stderr: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE"
 
-#![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument
+#![debugger_visualizer(random_file = "../foo.random")] //~ ERROR malformed `debugger_visualizer` attribute input
 #![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR
 fn main() {}
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.stderr b/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
index 6fbb4d641e6..e877e39d8f1 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
@@ -1,18 +1,20 @@
-error: invalid argument
-  --> $DIR/invalid-debugger-visualizer-option.rs:4:24
-   |
-LL | #![debugger_visualizer(random_file = "../foo.random")]
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: expected: `natvis_file = "..."`
-   = note: OR
-   = note: expected: `gdb_script_file = "..."`
-
 error: couldn't read $DIR/../foo.random: $FILE_NOT_FOUND_MSG (os error $FILE_NOT_FOUND_CODE)
   --> $DIR/invalid-debugger-visualizer-option.rs:5:24
    |
 LL | #![debugger_visualizer(natvis_file = "../foo.random")]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+error[E0539]: malformed `debugger_visualizer` attribute input
+  --> $DIR/invalid-debugger-visualizer-option.rs:4:1
+   |
+LL | #![debugger_visualizer(random_file = "../foo.random")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^^^^^^^^^^^^^^^^^
+   | |                      |
+   | |                      valid arguments are `natvis_file` or `gdb_script_file`
+   | help: must be of the form: `#![debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute>
+
 error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0539`.
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.rs b/tests/ui/invalid/invalid-debugger-visualizer-target.rs
index 1efb9555c24..48b04153214 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.rs
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.rs
@@ -1,2 +1,3 @@
-#[debugger_visualizer(natvis_file = "./foo.natvis.xml")] //~ ERROR attribute should be applied to a module
+#[debugger_visualizer(natvis_file = "./foo.natvis.xml")]
+//~^ ERROR `#[debugger_visualizer]` attribute cannot be used on functions
 fn main() {}
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
index 1df34532533..629af94c5ef 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
@@ -1,8 +1,10 @@
-error: attribute should be applied to a module
+error: `#[debugger_visualizer]` attribute cannot be used on functions
   --> $DIR/invalid-debugger-visualizer-target.rs:1:1
    |
 LL | #[debugger_visualizer(natvis_file = "./foo.natvis.xml")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: `#[debugger_visualizer]` can be applied to modules and crates
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-25089.rs b/tests/ui/issues/issue-25089.rs
index 929738c3e79..63fdf64cea9 100644
--- a/tests/ui/issues/issue-25089.rs
+++ b/tests/ui/issues/issue-25089.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/issues/issue-26655.rs b/tests/ui/issues/issue-26655.rs
index 416472b0b26..32c4b33a8c9 100644
--- a/tests/ui/issues/issue-26655.rs
+++ b/tests/ui/issues/issue-26655.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Check that the destructors of simple enums are run on unwinding
 
diff --git a/tests/ui/issues/issue-29485.rs b/tests/ui/issues/issue-29485.rs
index a44bcd49c6a..8e6436cb11e 100644
--- a/tests/ui/issues/issue-29485.rs
+++ b/tests/ui/issues/issue-29485.rs
@@ -3,6 +3,7 @@
 //@ aux-build:issue-29485.rs
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #[feature(recover)]
 
diff --git a/tests/ui/issues/issue-30018-panic.rs b/tests/ui/issues/issue-30018-panic.rs
index 591848b6f7b..09b832bb59d 100644
--- a/tests/ui/issues/issue-30018-panic.rs
+++ b/tests/ui/issues/issue-30018-panic.rs
@@ -6,6 +6,7 @@
 
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 struct Foo;
 
diff --git a/tests/ui/issues/issue-44056.rs b/tests/ui/issues/issue-44056.rs
index 12e4f018466..37d7b00cf7f 100644
--- a/tests/ui/issues/issue-44056.rs
+++ b/tests/ui/issues/issue-44056.rs
@@ -2,5 +2,6 @@
 //@ only-x86_64
 //@ no-prefer-dynamic
 //@ compile-flags: -Ctarget-feature=+avx -Clto
+//@ ignore-backends: gcc
 
 fn main() {}
diff --git a/tests/ui/issues/issue-68696-catch-during-unwind.rs b/tests/ui/issues/issue-68696-catch-during-unwind.rs
index 80d63b0cde7..655879e1869 100644
--- a/tests/ui/issues/issue-68696-catch-during-unwind.rs
+++ b/tests/ui/issues/issue-68696-catch-during-unwind.rs
@@ -4,6 +4,7 @@
 // entering the catch_unwind.
 //
 //@ run-pass
+//@ ignore-backends: gcc
 
 use std::panic::catch_unwind;
 
diff --git a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
index e5de08a7a28..512616251c2 100644
--- a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
+++ b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
@@ -3,6 +3,7 @@
 //@ known-bug: #109681
 //@ ignore-wasm32 this appears to SIGABRT on wasm, not fail cleanly
 //@ compile-flags: -Z verify-llvm-ir
+//@ ignore-backends: gcc
 
 // This test verifies that we continue to hit the LLVM error for common linkage with non-zero
 // initializers, since it generates invalid LLVM IR.
diff --git a/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs b/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
index 57492ed2d0e..62d352facd1 100644
--- a/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
+++ b/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
@@ -3,6 +3,7 @@
 //@ run-pass
 //@ compile-flags: -Cpanic=abort
 //@ edition: 2024
+//@ ignore-backends: gcc
 
 #![allow(incomplete_features)]
 #![feature(raw_dylib_elf)]
diff --git a/tests/ui/linking/no-gc-encapsulation-symbols.rs b/tests/ui/linking/no-gc-encapsulation-symbols.rs
index 36d69969199..c60f35b55eb 100644
--- a/tests/ui/linking/no-gc-encapsulation-symbols.rs
+++ b/tests/ui/linking/no-gc-encapsulation-symbols.rs
@@ -5,6 +5,7 @@
 //
 //@ build-pass
 //@ only-x86_64-unknown-linux-gnu
+//@ ignore-backends: gcc
 
 unsafe extern "Rust" {
     // The __start_ section name is magical for the linker,
diff --git a/tests/ui/lint/unused-qualification-in-derive-expansion.rs b/tests/ui/lint/unused-qualification-in-derive-expansion.rs
index b2067e22c44..bf095c6449d 100644
--- a/tests/ui/lint/unused-qualification-in-derive-expansion.rs
+++ b/tests/ui/lint/unused-qualification-in-derive-expansion.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: add-impl.rs
+//@ ignore-backends: gcc
 
 #![forbid(unused_qualifications)]
 
diff --git a/tests/ui/lto/debuginfo-lto-alloc.rs b/tests/ui/lto/debuginfo-lto-alloc.rs
index d6855f8760d..7c82d978a07 100644
--- a/tests/ui/lto/debuginfo-lto-alloc.rs
+++ b/tests/ui/lto/debuginfo-lto-alloc.rs
@@ -12,6 +12,7 @@
 //@ compile-flags: --test -C debuginfo=2 -C lto=fat
 //@ no-prefer-dynamic
 //@ incremental
+//@ ignore-backends: gcc
 
 extern crate alloc;
 
diff --git a/tests/ui/lto/debuginfo-lto.rs b/tests/ui/lto/debuginfo-lto.rs
index f189a1df056..6d8b836235c 100644
--- a/tests/ui/lto/debuginfo-lto.rs
+++ b/tests/ui/lto/debuginfo-lto.rs
@@ -7,6 +7,7 @@
 //@ aux-build:debuginfo-lto-aux.rs
 //@ compile-flags: -C lto -g
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 extern crate debuginfo_lto_aux;
 
diff --git a/tests/ui/lto/dwarf-mixed-versions-lto.rs b/tests/ui/lto/dwarf-mixed-versions-lto.rs
index 900274eb22f..8ed3afa5e33 100644
--- a/tests/ui/lto/dwarf-mixed-versions-lto.rs
+++ b/tests/ui/lto/dwarf-mixed-versions-lto.rs
@@ -7,6 +7,7 @@
 //@ compile-flags: -C lto -g -Cdwarf-version=5
 //@ no-prefer-dynamic
 //@ build-pass
+//@ ignore-backends: gcc
 
 extern crate dwarf_mixed_versions_lto_aux;
 
diff --git a/tests/ui/lto/fat-lto.rs b/tests/ui/lto/fat-lto.rs
index 73d6801a25a..fe00d7feb37 100644
--- a/tests/ui/lto/fat-lto.rs
+++ b/tests/ui/lto/fat-lto.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ compile-flags: -Clto=fat
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 fn main() {
     println!("hello!");
diff --git a/tests/ui/lto/issue-100772.rs b/tests/ui/lto/issue-100772.rs
index 9468e20894a..e07d44e3be8 100644
--- a/tests/ui/lto/issue-100772.rs
+++ b/tests/ui/lto/issue-100772.rs
@@ -3,6 +3,7 @@
 //@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi -C unsafe-allow-abi-mismatch=sanitizer
 //@ no-prefer-dynamic
 //@ only-x86_64-unknown-linux-gnu
+//@ ignore-backends: gcc
 
 #![feature(allocator_api)]
 
diff --git a/tests/ui/lto/lto-duplicate-symbols.rs b/tests/ui/lto/lto-duplicate-symbols.rs
index a62ab2e2217..08465eb0fb2 100644
--- a/tests/ui/lto/lto-duplicate-symbols.rs
+++ b/tests/ui/lto/lto-duplicate-symbols.rs
@@ -4,6 +4,7 @@
 //@ compile-flags: -C lto
 //@ no-prefer-dynamic
 //@ normalize-stderr: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu"
+//@ ignore-backends: gcc
 extern crate lto_duplicate_symbols1;
 extern crate lto_duplicate_symbols2;
 
diff --git a/tests/ui/lto/lto-many-codegen-units.rs b/tests/ui/lto/lto-many-codegen-units.rs
index fb6636fb815..6761510e427 100644
--- a/tests/ui/lto/lto-many-codegen-units.rs
+++ b/tests/ui/lto/lto-many-codegen-units.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ compile-flags: -C lto -C codegen-units=8
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 fn main() {
 }
diff --git a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs
index 18e937cb29a..2be320f0bff 100644
--- a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs
+++ b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs
@@ -2,6 +2,7 @@
 //@ aux-build:lto-rustc-loads-linker-plugin.rs
 //@ run-pass
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 // This test ensures that if a dependency was compiled with
 // `-Clinker-plugin-lto` then we can compile with `-Clto` and still link against
diff --git a/tests/ui/lto/lto-still-runs-thread-dtors.rs b/tests/ui/lto/lto-still-runs-thread-dtors.rs
index 900368496eb..9a97677773c 100644
--- a/tests/ui/lto/lto-still-runs-thread-dtors.rs
+++ b/tests/ui/lto/lto-still-runs-thread-dtors.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: -C lto
 //@ no-prefer-dynamic
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // FIXME(static_mut_refs): this could use an atomic
 #![allow(static_mut_refs)]
diff --git a/tests/ui/macros/same-sequence-span.rs b/tests/ui/macros/same-sequence-span.rs
index dfaf669a769..9fae847a4e2 100644
--- a/tests/ui/macros/same-sequence-span.rs
+++ b/tests/ui/macros/same-sequence-span.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: proc_macro_sequence.rs
+//@ ignore-backends: gcc
 
 // Regression test for issue #62831: Check that multiple sequences with the same span in the
 // left-hand side of a macro definition behave as if they had unique spans, and in particular that
diff --git a/tests/ui/macros/same-sequence-span.stderr b/tests/ui/macros/same-sequence-span.stderr
index 34df201f5a5..1ca89b6b595 100644
--- a/tests/ui/macros/same-sequence-span.stderr
+++ b/tests/ui/macros/same-sequence-span.stderr
@@ -1,5 +1,5 @@
 error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:14:18
+  --> $DIR/same-sequence-span.rs:15:18
    |
 LL |     (1 $x:expr $($y:tt,)*
    |                  ^^^^^ not allowed after `expr` fragments
@@ -7,7 +7,7 @@ LL |     (1 $x:expr $($y:tt,)*
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:15:18
+  --> $DIR/same-sequence-span.rs:16:18
    |
 LL |                $(= $z:tt)*
    |                  ^ not allowed after `expr` fragments
@@ -15,10 +15,10 @@ LL |                $(= $z:tt)*
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:19:1
+  --> $DIR/same-sequence-span.rs:20:1
    |
-LL | | macro_rules! manual_foo {
-   | |__________________________^not allowed after `expr` fragments
+LL | | // `proc_macro_sequence.rs`.
+   | |_____________________________^not allowed after `expr` fragments
 ...
 LL |   proc_macro_sequence::make_foo!();
    |   ^-------------------------------
@@ -30,7 +30,7 @@ LL |   proc_macro_sequence::make_foo!();
    = note: this error originates in the macro `proc_macro_sequence::make_foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:19:1
+  --> $DIR/same-sequence-span.rs:20:1
    |
 LL | proc_macro_sequence::make_foo!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed after `expr` fragments
diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs
index 6397f62d065..fd4a5a6052b 100644
--- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs
+++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: -C overflow-checks=on
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs
index 87867fdc93e..52df432669f 100644
--- a/tests/ui/numbers-arithmetic/issue-8460.rs
+++ b/tests/ui/numbers-arithmetic/issue-8460.rs
@@ -2,6 +2,7 @@
 #![allow(unused_must_use)]
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 #![feature(rustc_attrs)]
 
 use std::thread;
diff --git a/tests/ui/panic-runtime/lto-unwind.rs b/tests/ui/panic-runtime/lto-unwind.rs
index 93275052f85..bafc6d5aaa5 100644
--- a/tests/ui/panic-runtime/lto-unwind.rs
+++ b/tests/ui/panic-runtime/lto-unwind.rs
@@ -3,6 +3,7 @@
 //@ needs-unwind
 //@ no-prefer-dynamic
 //@ needs-subprocess
+//@ ignore-backends: gcc
 
 use std::process::Command;
 use std::env;
diff --git a/tests/ui/panics/oom-panic-unwind.rs b/tests/ui/panics/oom-panic-unwind.rs
index 5974ad91406..4f7939ce60b 100644
--- a/tests/ui/panics/oom-panic-unwind.rs
+++ b/tests/ui/panics/oom-panic-unwind.rs
@@ -5,6 +5,7 @@
 //@ no-prefer-dynamic
 //@ needs-unwind
 //@ only-linux
+//@ ignore-backends: gcc
 
 use std::hint::black_box;
 use std::mem::forget;
diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs
index 662ea9e978f..2ae79ad236e 100644
--- a/tests/ui/panics/panic-handler-chain-update-hook.rs
+++ b/tests/ui/panics/panic-handler-chain-update-hook.rs
@@ -3,6 +3,7 @@
 #![allow(stable_features)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![feature(std_panic)]
 #![feature(panic_update_hook)]
diff --git a/tests/ui/panics/panic-handler-chain.rs b/tests/ui/panics/panic-handler-chain.rs
index fea71ad9ec4..cc591c1d999 100644
--- a/tests/ui/panics/panic-handler-chain.rs
+++ b/tests/ui/panics/panic-handler-chain.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 #![allow(stable_features)]
 
 #![feature(std_panic)]
diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs
index d42dfd68d9c..d5f5195d381 100644
--- a/tests/ui/panics/panic-handler-flail-wildly.rs
+++ b/tests/ui/panics/panic-handler-flail-wildly.rs
@@ -5,6 +5,7 @@
 #![allow(unused_must_use)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![feature(std_panic)]
 
diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs
index 5f670d5f492..ca4ed65f568 100644
--- a/tests/ui/panics/panic-handler-set-twice.rs
+++ b/tests/ui/panics/panic-handler-set-twice.rs
@@ -6,6 +6,7 @@
 #![feature(std_panic)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::panic;
diff --git a/tests/ui/panics/panic-in-dtor-drops-fields.rs b/tests/ui/panics/panic-in-dtor-drops-fields.rs
index 38eb6d0acfb..db079234337 100644
--- a/tests/ui/panics/panic-in-dtor-drops-fields.rs
+++ b/tests/ui/panics/panic-in-dtor-drops-fields.rs
@@ -4,6 +4,7 @@
 #![allow(non_upper_case_globals)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/panics/panic-recover-propagate.rs b/tests/ui/panics/panic-recover-propagate.rs
index ef6ae4fd788..36ca279bdbd 100644
--- a/tests/ui/panics/panic-recover-propagate.rs
+++ b/tests/ui/panics/panic-recover-propagate.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::panic;
diff --git a/tests/ui/panics/rvalue-cleanup-during-box-panic.rs b/tests/ui/panics/rvalue-cleanup-during-box-panic.rs
index 84c5d85d7e0..03571f111aa 100644
--- a/tests/ui/panics/rvalue-cleanup-during-box-panic.rs
+++ b/tests/ui/panics/rvalue-cleanup-during-box-panic.rs
@@ -21,6 +21,7 @@
 // scenario worth testing.
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/panics/unwind-force-no-unwind-tables.rs b/tests/ui/panics/unwind-force-no-unwind-tables.rs
index 2226e4dd03e..715f288fff1 100644
--- a/tests/ui/panics/unwind-force-no-unwind-tables.rs
+++ b/tests/ui/panics/unwind-force-no-unwind-tables.rs
@@ -6,6 +6,7 @@
 //@ needs-unwind
 //@ ignore-windows target requires uwtable
 //@ compile-flags: -C panic=unwind -C force-unwind-tables=n
+//@ ignore-backends: gcc
 
 use std::panic::{self, AssertUnwindSafe};
 
diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs
index 461890e63e3..c82efe79e4d 100644
--- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs
+++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-89971-outer-attr-following-inner-attr-ice.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_89971_outer_attr_following_inner_attr_ice;
diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
index 51df17c7cc6..392e7d0321f 100644
--- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
+++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
@@ -1,5 +1,5 @@
 error: an inner attribute is not permitted in this context
-  --> $DIR/issue-89971-outer-attr-following-inner-attr-ice.rs:11:1
+  --> $DIR/issue-89971-outer-attr-following-inner-attr-ice.rs:12:1
    |
 LL | #![deny(missing_docs)]
    | ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
index 775c5077976..701e7dfa30a 100644
--- a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
+++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
@@ -1,6 +1,7 @@
 // Regression test for #140281
 //@ edition: 2021
 //@ proc-macro: unicode-control.rs
+//@ ignore-backends: gcc
 
 extern crate unicode_control;
 use unicode_control::*;
diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
index ca813399eac..22fb1b945c6 100644
--- a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
+++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
@@ -1,5 +1,5 @@
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:20:9
+  --> $DIR/unicode-control-codepoints-macros.rs:21:9
    |
 LL |         /// �test� RTL in doc in vec
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
@@ -10,7 +10,7 @@ LL |         /// �test� RTL in doc in vec
    = note: `#[deny(text_direction_codepoint_in_literal)]` on by default
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:25:9
+  --> $DIR/unicode-control-codepoints-macros.rs:26:9
    |
 LL | /         /**
 LL | |          * �test� RTL in doc in macro
@@ -22,7 +22,7 @@ LL | |          */
    = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:32:9
+  --> $DIR/unicode-control-codepoints-macros.rs:33:9
    |
 LL | /         /**
 LL | |          * �test� RTL in doc in macro
@@ -34,7 +34,7 @@ LL | |          */
    = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:40:9
+  --> $DIR/unicode-control-codepoints-macros.rs:41:9
    |
 LL |         /// �test� RTL in doc in proc macro
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
@@ -44,7 +44,7 @@ LL |         /// �test� RTL in doc in proc macro
    = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:45:9
+  --> $DIR/unicode-control-codepoints-macros.rs:46:9
    |
 LL |         /// �test� RTL in doc in proc macro
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
diff --git a/tests/ui/parser/tuple-index-suffix-proc-macro.rs b/tests/ui/parser/tuple-index-suffix-proc-macro.rs
index 557c67738d3..2463897381e 100644
--- a/tests/ui/parser/tuple-index-suffix-proc-macro.rs
+++ b/tests/ui/parser/tuple-index-suffix-proc-macro.rs
@@ -3,6 +3,7 @@
 //! Like `tuple-index-suffix.rs`, but exercises the proc-macro interaction.
 
 //@ proc-macro: tuple-index-suffix-proc-macro-aux.rs
+//@ ignore-backends: gcc
 
 extern crate tuple_index_suffix_proc_macro_aux;
 use tuple_index_suffix_proc_macro_aux as aux;
diff --git a/tests/ui/parser/tuple-index-suffix-proc-macro.stderr b/tests/ui/parser/tuple-index-suffix-proc-macro.stderr
index 47d179d3555..a242af5a789 100644
--- a/tests/ui/parser/tuple-index-suffix-proc-macro.stderr
+++ b/tests/ui/parser/tuple-index-suffix-proc-macro.stderr
@@ -1,23 +1,23 @@
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:17:28
+  --> $DIR/tuple-index-suffix-proc-macro.rs:18:28
    |
 LL |     aux::bad_tup_indexing!(0usize);
    |                            ^^^^^^ invalid suffix `usize`
 
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:19:47
+  --> $DIR/tuple-index-suffix-proc-macro.rs:20:47
    |
 LL |     aux::bad_tup_struct_indexing!(tup_struct, 0isize);
    |                                               ^^^^^^ invalid suffix `isize`
 
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:24:28
+  --> $DIR/tuple-index-suffix-proc-macro.rs:25:28
    |
 LL |     aux::bad_tup_indexing!(0u8);
    |                            ^^^ invalid suffix `u8`
 
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:26:47
+  --> $DIR/tuple-index-suffix-proc-macro.rs:27:47
    |
 LL |     aux::bad_tup_struct_indexing!(tup_struct, 0u64);
    |                                               ^^^^ invalid suffix `u64`
diff --git a/tests/ui/proc-macro/add-impl.rs b/tests/ui/proc-macro/add-impl.rs
index 2299f05c2e7..645e9321bba 100644
--- a/tests/ui/proc-macro/add-impl.rs
+++ b/tests/ui/proc-macro/add-impl.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: add-impl.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate add_impl;
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
index 8ee2223822a..e580e0784b3 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
@@ -1,5 +1,6 @@
 //@ proc-macro: builtin-attrs.rs
 //@ compile-flags:--test
+//@ ignore-backends: gcc
 
 #![feature(decl_macro, test)]
 
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
index 346cebf639d..e5de873cf31 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `NonExistent` in this scope
-  --> $DIR/ambiguous-builtin-attrs-test.rs:19:5
+  --> $DIR/ambiguous-builtin-attrs-test.rs:20:5
    |
 LL |     NonExistent;
    |     ^^^^^^^^^^^ not found in this scope
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs
index edc7748eff3..63d3c79055c 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs
@@ -1,5 +1,6 @@
 //@ edition:2018
 //@ proc-macro: builtin-attrs.rs
+//@ ignore-backends: gcc
 #![feature(decl_macro)] //~ ERROR `feature` is ambiguous
 
 extern crate builtin_attrs;
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr
index 0f4ddc065a7..ff7894a41ea 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr
@@ -1,11 +1,11 @@
 error[E0425]: cannot find value `NonExistent` in this scope
-  --> $DIR/ambiguous-builtin-attrs.rs:34:5
+  --> $DIR/ambiguous-builtin-attrs.rs:35:5
    |
 LL |     NonExistent;
    |     ^^^^^^^^^^^ not found in this scope
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:9:3
+  --> $DIR/ambiguous-builtin-attrs.rs:10:3
    |
 LL | #[repr(C)]
    |   ^^^^ ambiguous name
@@ -13,14 +13,14 @@ LL | #[repr(C)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:11:19
+  --> $DIR/ambiguous-builtin-attrs.rs:12:19
    |
 LL | #[cfg_attr(all(), repr(C))]
    |                   ^^^^ ambiguous name
@@ -28,14 +28,14 @@ LL | #[cfg_attr(all(), repr(C))]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:20:34
+  --> $DIR/ambiguous-builtin-attrs.rs:21:34
    |
 LL | fn non_macro_expanded_location<#[repr(C)] T>() {
    |                                  ^^^^ ambiguous name
@@ -43,14 +43,14 @@ LL | fn non_macro_expanded_location<#[repr(C)] T>() {
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:24:11
+  --> $DIR/ambiguous-builtin-attrs.rs:25:11
    |
 LL |         #[repr(C)]
    |           ^^^^ ambiguous name
@@ -58,14 +58,14 @@ LL |         #[repr(C)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `allow` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:38:3
+  --> $DIR/ambiguous-builtin-attrs.rs:39:3
    |
 LL | #[allow(unused)]
    |   ^^^^^ ambiguous name
@@ -73,14 +73,14 @@ LL | #[allow(unused)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `allow` could refer to a built-in attribute
 note: `allow` could also refer to the built-in attribute imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:37:5
+  --> $DIR/ambiguous-builtin-attrs.rs:38:5
    |
 LL | use deny as allow;
    |     ^^^^^^^^^^^^^
    = help: use `crate::allow` to refer to this built-in attribute unambiguously
 
 error[E0659]: `feature` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:3:4
+  --> $DIR/ambiguous-builtin-attrs.rs:4:4
    |
 LL | #![feature(decl_macro)]
    |    ^^^^^^^ ambiguous name
@@ -88,20 +88,20 @@ LL | #![feature(decl_macro)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `feature` could refer to a built-in attribute
 note: `feature` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::feature` to refer to this attribute macro unambiguously
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/ambiguous-builtin-attrs.rs:20:39
+  --> $DIR/ambiguous-builtin-attrs.rs:21:39
    |
 LL | fn non_macro_expanded_location<#[repr(C)] T>() {
    |                                       ^   - not a struct, enum, or union
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/ambiguous-builtin-attrs.rs:24:16
+  --> $DIR/ambiguous-builtin-attrs.rs:25:16
    |
 LL |         #[repr(C)]
    |                ^
diff --git a/tests/ui/proc-macro/append-impl.rs b/tests/ui/proc-macro/append-impl.rs
index c0f208460b2..48d21968de0 100644
--- a/tests/ui/proc-macro/append-impl.rs
+++ b/tests/ui/proc-macro/append-impl.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: append-impl.rs
+//@ ignore-backends: gcc
 
 #![allow(warnings)]
 
diff --git a/tests/ui/proc-macro/attr-args.rs b/tests/ui/proc-macro/attr-args.rs
index 1d3e0f725d2..4109b450a8a 100644
--- a/tests/ui/proc-macro/attr-args.rs
+++ b/tests/ui/proc-macro/attr-args.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: attr-args.rs
+//@ ignore-backends: gcc
 
 #![allow(warnings)]
 
diff --git a/tests/ui/proc-macro/attr-invalid-exprs.rs b/tests/ui/proc-macro/attr-invalid-exprs.rs
index f476858a32b..bdfc0587b3b 100644
--- a/tests/ui/proc-macro/attr-invalid-exprs.rs
+++ b/tests/ui/proc-macro/attr-invalid-exprs.rs
@@ -1,6 +1,7 @@
 //! Attributes producing expressions in invalid locations
 
 //@ proc-macro: attr-stmt-expr.rs
+//@ ignore-backends: gcc
 
 #![feature(proc_macro_hygiene)]
 #![feature(stmt_expr_attributes)]
diff --git a/tests/ui/proc-macro/attr-invalid-exprs.stderr b/tests/ui/proc-macro/attr-invalid-exprs.stderr
index 0d500c87145..43241e1e6fd 100644
--- a/tests/ui/proc-macro/attr-invalid-exprs.stderr
+++ b/tests/ui/proc-macro/attr-invalid-exprs.stderr
@@ -1,11 +1,11 @@
 error: expected expression, found end of macro arguments
-  --> $DIR/attr-invalid-exprs.rs:12:13
+  --> $DIR/attr-invalid-exprs.rs:13:13
    |
 LL |     let _ = #[no_output] "Hello, world!";
    |             ^^^^^^^^^^^^
 
 error: macro expansion ignores `,` and any tokens following
-  --> $DIR/attr-invalid-exprs.rs:15:13
+  --> $DIR/attr-invalid-exprs.rs:16:13
    |
 LL |     let _ = #[duplicate] "Hello, world!";
    |             ^^^^^^^^^^^^ caused by the macro expansion here
@@ -17,7 +17,7 @@ LL |     let _ = #[duplicate]; "Hello, world!";
    |                         +
 
 error: macro expansion ignores `,` and any tokens following
-  --> $DIR/attr-invalid-exprs.rs:24:9
+  --> $DIR/attr-invalid-exprs.rs:25:9
    |
 LL |         #[duplicate]
    |         ^^^^^^^^^^^^ caused by the macro expansion here
diff --git a/tests/ui/proc-macro/attr-on-trait.rs b/tests/ui/proc-macro/attr-on-trait.rs
index e95760a837c..345653864f8 100644
--- a/tests/ui/proc-macro/attr-on-trait.rs
+++ b/tests/ui/proc-macro/attr-on-trait.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: attr-on-trait.rs
+//@ ignore-backends: gcc
 
 extern crate attr_on_trait;
 
diff --git a/tests/ui/proc-macro/bang-macro.rs b/tests/ui/proc-macro/bang-macro.rs
index 2287e34c5dd..75f40de242e 100644
--- a/tests/ui/proc-macro/bang-macro.rs
+++ b/tests/ui/proc-macro/bang-macro.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: bang-macro.rs
+//@ ignore-backends: gcc
 
 extern crate bang_macro;
 use bang_macro::rewrite;
diff --git a/tests/ui/proc-macro/call-site.rs b/tests/ui/proc-macro/call-site.rs
index 9c285e1ed11..5de4061b2a9 100644
--- a/tests/ui/proc-macro/call-site.rs
+++ b/tests/ui/proc-macro/call-site.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ proc-macro: call-site.rs
+//@ ignore-backends: gcc
 
 extern crate call_site;
 
diff --git a/tests/ui/proc-macro/count_compound_ops.rs b/tests/ui/proc-macro/count_compound_ops.rs
index 20b0b87817e..fe90e7bfbe4 100644
--- a/tests/ui/proc-macro/count_compound_ops.rs
+++ b/tests/ui/proc-macro/count_compound_ops.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: count_compound_ops.rs
+//@ ignore-backends: gcc
 
 extern crate count_compound_ops;
 use count_compound_ops::count_compound_ops;
diff --git a/tests/ui/proc-macro/derive-bad.rs b/tests/ui/proc-macro/derive-bad.rs
index 9b237c731db..9b9a2bc33c9 100644
--- a/tests/ui/proc-macro/derive-bad.rs
+++ b/tests/ui/proc-macro/derive-bad.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: derive-bad.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_bad;
diff --git a/tests/ui/proc-macro/derive-bad.stderr b/tests/ui/proc-macro/derive-bad.stderr
index 43e97f40ba8..8a252e826ef 100644
--- a/tests/ui/proc-macro/derive-bad.stderr
+++ b/tests/ui/proc-macro/derive-bad.stderr
@@ -1,5 +1,5 @@
 error: expected `:`, found `}`
-  --> $DIR/derive-bad.rs:6:10
+  --> $DIR/derive-bad.rs:7:10
    |
 LL | #[derive(A)]
    |          ^
@@ -10,13 +10,13 @@ LL | #[derive(A)]
    = note: this error originates in the derive macro `A` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: proc-macro derive produced unparsable tokens
-  --> $DIR/derive-bad.rs:6:10
+  --> $DIR/derive-bad.rs:7:10
    |
 LL | #[derive(A)]
    |          ^
 
 error[E0428]: the name `A` is defined multiple times
-  --> $DIR/derive-bad.rs:9:1
+  --> $DIR/derive-bad.rs:10:1
    |
 LL | #[derive(A)]
    |          - previous definition of the type `A` here
diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs
index ee883be3352..5ddd914d102 100644
--- a/tests/ui/proc-macro/derive-helper-shadowing.rs
+++ b/tests/ui/proc-macro/derive-helper-shadowing.rs
@@ -1,6 +1,7 @@
 //@ edition:2018
 //@ proc-macro: test-macros.rs
 //@ proc-macro: derive-helper-shadowing.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate test_macros;
diff --git a/tests/ui/proc-macro/derive-helper-shadowing.stderr b/tests/ui/proc-macro/derive-helper-shadowing.stderr
index 2e4ddd19b7e..90b42e8d6e2 100644
--- a/tests/ui/proc-macro/derive-helper-shadowing.stderr
+++ b/tests/ui/proc-macro/derive-helper-shadowing.stderr
@@ -1,17 +1,17 @@
 error: cannot use a derive helper attribute through an import
-  --> $DIR/derive-helper-shadowing.rs:42:15
+  --> $DIR/derive-helper-shadowing.rs:43:15
    |
 LL |             #[renamed]
    |               ^^^^^^^
    |
 note: the derive helper attribute imported here
-  --> $DIR/derive-helper-shadowing.rs:41:17
+  --> $DIR/derive-helper-shadowing.rs:42:17
    |
 LL |             use empty_helper as renamed;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot find attribute `empty_helper` in this scope
-  --> $DIR/derive-helper-shadowing.rs:38:22
+  --> $DIR/derive-helper-shadowing.rs:39:22
    |
 LL |             #[derive(GenHelperUse)]
    |                      ^^^^^^^^^^^^
@@ -24,7 +24,7 @@ LL +             use empty_helper;
    |
 
 error: cannot find attribute `empty_helper` in this scope
-  --> $DIR/derive-helper-shadowing.rs:14:11
+  --> $DIR/derive-helper-shadowing.rs:15:11
    |
 LL |         #[empty_helper]
    |           ^^^^^^^^^^^^
@@ -40,26 +40,26 @@ LL +             use crate::empty_helper;
    |
 
 error[E0659]: `empty_helper` is ambiguous
-  --> $DIR/derive-helper-shadowing.rs:19:3
+  --> $DIR/derive-helper-shadowing.rs:20:3
    |
 LL | #[empty_helper]
    |   ^^^^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of a name conflict with a derive helper attribute
 note: `empty_helper` could refer to the derive helper attribute defined here
-  --> $DIR/derive-helper-shadowing.rs:22:10
+  --> $DIR/derive-helper-shadowing.rs:23:10
    |
 LL | #[derive(Empty)]
    |          ^^^^^
 note: `empty_helper` could also refer to the attribute macro imported here
-  --> $DIR/derive-helper-shadowing.rs:10:5
+  --> $DIR/derive-helper-shadowing.rs:11:5
    |
 LL | use test_macros::empty_attr as empty_helper;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
 
 error: derive helper attribute is used before it is introduced
-  --> $DIR/derive-helper-shadowing.rs:19:3
+  --> $DIR/derive-helper-shadowing.rs:20:3
    |
 LL | #[empty_helper]
    |   ^^^^^^^^^^^^
@@ -76,7 +76,7 @@ error: aborting due to 5 previous errors
 For more information about this error, try `rustc --explain E0659`.
 Future incompatibility report: Future breakage diagnostic:
 error: derive helper attribute is used before it is introduced
-  --> $DIR/derive-helper-shadowing.rs:19:3
+  --> $DIR/derive-helper-shadowing.rs:20:3
    |
 LL | #[empty_helper]
    |   ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/derive-same-struct.rs b/tests/ui/proc-macro/derive-same-struct.rs
index f7669ba1480..04ab08dc76e 100644
--- a/tests/ui/proc-macro/derive-same-struct.rs
+++ b/tests/ui/proc-macro/derive-same-struct.rs
@@ -3,6 +3,7 @@
 #![allow(path_statements)]
 #![allow(dead_code)]
 //@ proc-macro: derive-same-struct.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_same_struct;
diff --git a/tests/ui/proc-macro/edition-imports-2018.rs b/tests/ui/proc-macro/edition-imports-2018.rs
index a3808d9dce8..af9eed74adb 100644
--- a/tests/ui/proc-macro/edition-imports-2018.rs
+++ b/tests/ui/proc-macro/edition-imports-2018.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ edition:2018
 //@ proc-macro: edition-imports-2015.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate edition_imports_2015;
diff --git a/tests/ui/proc-macro/env.rs b/tests/ui/proc-macro/env.rs
index 94e3b09e526..fc248f88359 100644
--- a/tests/ui/proc-macro/env.rs
+++ b/tests/ui/proc-macro/env.rs
@@ -2,6 +2,7 @@
 //@ run-pass
 //@ rustc-env: THE_CONST=1
 //@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4
+//@ ignore-backends: gcc
 
 #![crate_name = "foo"]
 
diff --git a/tests/ui/proc-macro/expand-expr.rs b/tests/ui/proc-macro/expand-expr.rs
index 8a4ed9768d5..1e058abe3bc 100644
--- a/tests/ui/proc-macro/expand-expr.rs
+++ b/tests/ui/proc-macro/expand-expr.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: expand-expr.rs
+//@ ignore-backends: gcc
 // no-remap-src-base: check_expand_expr_file!() fails when enabled.
 
 #![feature(concat_bytes)]
@@ -10,7 +11,7 @@ use expand_expr::{
 
 // Check builtin macros can be expanded.
 
-expand_expr_is!(13u32, line!());
+expand_expr_is!(14u32, line!());
 expand_expr_is!(24u32, column!());
 
 expand_expr_is!("Hello, World!", concat!("Hello, ", "World", "!"));
diff --git a/tests/ui/proc-macro/expand-expr.stderr b/tests/ui/proc-macro/expand-expr.stderr
index 8b1df177cfa..fd5f672adf5 100644
--- a/tests/ui/proc-macro/expand-expr.stderr
+++ b/tests/ui/proc-macro/expand-expr.stderr
@@ -1,29 +1,29 @@
 error: expected one of `.`, `?`, or an operator, found `;`
-  --> $DIR/expand-expr.rs:108:27
+  --> $DIR/expand-expr.rs:109:27
    |
 LL | expand_expr_fail!("string"; hello);
    |                           ^ expected one of `.`, `?`, or an operator
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:111:19
+  --> $DIR/expand-expr.rs:112:19
    |
 LL | expand_expr_fail!($);
    |                   ^ expected expression
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:112:29
+  --> $DIR/expand-expr.rs:113:29
    |
 LL | expand_expr_fail!(echo_tts!($));
    |                             ^ expected expression
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:113:28
+  --> $DIR/expand-expr.rs:114:28
    |
 LL | expand_expr_fail!(echo_pm!($));
    |                            ^ expected expression
 
 error: macro expansion ignores `hello` and any tokens following
-  --> $DIR/expand-expr.rs:117:47
+  --> $DIR/expand-expr.rs:118:47
    |
 LL | expand_expr_is!("string", echo_tts!("string"; hello));
    |                           --------------------^^^^^- caused by the macro expansion here
@@ -35,7 +35,7 @@ LL | expand_expr_is!("string", echo_tts!("string"; hello););
    |                                                     +
 
 error: macro expansion ignores `;` and any tokens following
-  --> $DIR/expand-expr.rs:118:44
+  --> $DIR/expand-expr.rs:119:44
    |
 LL | expand_expr_is!("string", echo_pm!("string"; hello));
    |                           -----------------^------- caused by the macro expansion here
@@ -47,7 +47,7 @@ LL | expand_expr_is!("string", echo_pm!("string"; hello););
    |                                                    +
 
 error: recursion limit reached while expanding `recursive_expand!`
-  --> $DIR/expand-expr.rs:126:16
+  --> $DIR/expand-expr.rs:127:16
    |
 LL | const _: u32 = recursive_expand!();
    |                ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/expand-to-unstable.rs b/tests/ui/proc-macro/expand-to-unstable.rs
index 8968471ebd8..37bfeab1fe7 100644
--- a/tests/ui/proc-macro/expand-to-unstable.rs
+++ b/tests/ui/proc-macro/expand-to-unstable.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: derive-unstable.rs
+//@ ignore-backends: gcc
 
 #![allow(warnings)]
 
diff --git a/tests/ui/proc-macro/expand-to-unstable.stderr b/tests/ui/proc-macro/expand-to-unstable.stderr
index 563c7ae8f95..255f80501ea 100644
--- a/tests/ui/proc-macro/expand-to-unstable.stderr
+++ b/tests/ui/proc-macro/expand-to-unstable.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
-  --> $DIR/expand-to-unstable.rs:8:10
+  --> $DIR/expand-to-unstable.rs:9:10
    |
 LL | #[derive(Unstable)]
    |          ^^^^^^^^
diff --git a/tests/ui/proc-macro/expand-with-a-macro.rs b/tests/ui/proc-macro/expand-with-a-macro.rs
index e5baf3601db..aa02cefbec6 100644
--- a/tests/ui/proc-macro/expand-with-a-macro.rs
+++ b/tests/ui/proc-macro/expand-with-a-macro.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ proc-macro: expand-with-a-macro.rs
+//@ ignore-backends: gcc
 
 
 #![deny(warnings)]
diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs
index 3deec94fa34..fb7c830c2ed 100644
--- a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs
+++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs
@@ -3,6 +3,7 @@
 // `$crate` refers to the crate that defines `macro_rules` and not the outer transparent macro.
 
 //@ proc-macro: gen-macro-rules-hygiene.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate gen_macro_rules_hygiene;
diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr
index df7c4f72eb0..e904b43aaae 100644
--- a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr
+++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr
@@ -1,5 +1,5 @@
 error[E0426]: use of undeclared label `'label_use`
-  --> $DIR/gen-macro-rules-hygiene.rs:12:1
+  --> $DIR/gen-macro-rules-hygiene.rs:13:1
    |
 LL | gen_macro_rules!();
    | ^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
@@ -10,7 +10,7 @@ LL |         generated!();
    = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_use` in this scope
-  --> $DIR/gen-macro-rules-hygiene.rs:12:1
+  --> $DIR/gen-macro-rules-hygiene.rs:13:1
    |
 LL | gen_macro_rules!();
    | ^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
@@ -21,7 +21,7 @@ LL |         generated!();
    = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
-  --> $DIR/gen-macro-rules-hygiene.rs:21:9
+  --> $DIR/gen-macro-rules-hygiene.rs:22:9
    |
 LL |         local_def;
    |         ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
diff --git a/tests/ui/proc-macro/gen-macro-rules.rs b/tests/ui/proc-macro/gen-macro-rules.rs
index 121d029e2e3..8ee38b2cc27 100644
--- a/tests/ui/proc-macro/gen-macro-rules.rs
+++ b/tests/ui/proc-macro/gen-macro-rules.rs
@@ -2,6 +2,7 @@
 
 //@ check-pass
 //@ proc-macro: gen-macro-rules.rs
+//@ ignore-backends: gcc
 
 extern crate gen_macro_rules as repro;
 
diff --git a/tests/ui/proc-macro/generate-mod.rs b/tests/ui/proc-macro/generate-mod.rs
index 729bfc1db66..0a1629e75ec 100644
--- a/tests/ui/proc-macro/generate-mod.rs
+++ b/tests/ui/proc-macro/generate-mod.rs
@@ -1,6 +1,7 @@
 // Modules generated by transparent proc macros still acts as barriers for names (issue #50504).
 
 //@ proc-macro: generate-mod.rs
+//@ ignore-backends: gcc
 
 extern crate generate_mod;
 
diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr
index 142ff1abeed..03cf8c35188 100644
--- a/tests/ui/proc-macro/generate-mod.stderr
+++ b/tests/ui/proc-macro/generate-mod.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:9:1
+  --> $DIR/generate-mod.rs:10:1
    |
 LL | generate_mod::check!();
    | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -9,7 +9,7 @@ LL | generate_mod::check!();
    = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `Outer` in this scope
-  --> $DIR/generate-mod.rs:9:1
+  --> $DIR/generate-mod.rs:10:1
    |
 LL | generate_mod::check!();
    | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -19,7 +19,7 @@ LL | generate_mod::check!();
    = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:12:1
+  --> $DIR/generate-mod.rs:13:1
    |
 LL | #[generate_mod::check_attr]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -29,7 +29,7 @@ LL | #[generate_mod::check_attr]
    = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `OuterAttr` in this scope
-  --> $DIR/generate-mod.rs:12:1
+  --> $DIR/generate-mod.rs:13:1
    |
 LL | #[generate_mod::check_attr]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -39,7 +39,7 @@ LL | #[generate_mod::check_attr]
    = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -50,7 +50,7 @@ LL | #[derive(generate_mod::CheckDerive)]
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -60,7 +60,7 @@ LL | #[derive(generate_mod::CheckDerive)]
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -70,7 +70,7 @@ LL |     #[derive(generate_mod::CheckDerive)]
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -84,7 +84,7 @@ error: aborting due to 8 previous errors
 For more information about this error, try `rustc --explain E0412`.
 Future incompatibility report: Future breakage diagnostic:
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -96,7 +96,7 @@ LL | #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -108,7 +108,7 @@ LL | #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -120,7 +120,7 @@ LL |     #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -132,7 +132,7 @@ LL |     #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 warning: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:30:10
+  --> $DIR/generate-mod.rs:31:10
    |
 LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -143,7 +143,7 @@ LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
 
 Future breakage diagnostic:
 warning: cannot find type `OuterDeriveLint` in this scope
-  --> $DIR/generate-mod.rs:30:10
+  --> $DIR/generate-mod.rs:31:10
    |
 LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
diff --git a/tests/ui/proc-macro/hygiene_example.rs b/tests/ui/proc-macro/hygiene_example.rs
index 84b5e345608..f74f22fb3b0 100644
--- a/tests/ui/proc-macro/hygiene_example.rs
+++ b/tests/ui/proc-macro/hygiene_example.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ aux-build:hygiene_example.rs
+//@ ignore-backends: gcc
 
 extern crate hygiene_example;
 use hygiene_example::hello;
diff --git a/tests/ui/proc-macro/is-available.rs b/tests/ui/proc-macro/is-available.rs
index faee560d7a9..9e9cf5d11b6 100644
--- a/tests/ui/proc-macro/is-available.rs
+++ b/tests/ui/proc-macro/is-available.rs
@@ -3,6 +3,7 @@
 extern crate proc_macro;
 
 //@ proc-macro: is-available.rs
+//@ ignore-backends: gcc
 extern crate is_available;
 
 fn main() {
diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
index abdd6bf136d..d420f2641da 100644
--- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
+++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-104884.rs
+//@ ignore-backends: gcc
 
 use std::collections::BinaryHeap;
 
diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
index f3ed9e5761d..b7aed4a8485 100644
--- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
+++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
@@ -1,11 +1,11 @@
 error[E0277]: can't compare `PriorityQueue<T>` with `PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:10
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:10
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |          ^^^^^^^^^^ no implementation for `PriorityQueue<T> == PriorityQueue<T>`
    |
 help: the trait `PartialEq` is not implemented for `PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:20:1
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:21:1
    |
 LL | struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
    | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,13 +13,13 @@ note: required by a bound in `PartialOrd`
   --> $SRC_DIR/core/src/cmp.rs:LL:COL
 
 error[E0277]: the trait bound `PriorityQueue<T>: Eq` is not satisfied
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ unsatisfied trait bound
    |
 help: the trait `Eq` is not implemented for `PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:20:1
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:21:1
    |
 LL | struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
    | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -28,13 +28,13 @@ note: required by a bound in `Ord`
    = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: can't compare `T` with `T`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ no implementation for `T < T` and `T > T`
    |
 note: required for `PriorityQueue<T>` to implement `PartialOrd`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:10
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:10
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |          ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
@@ -42,7 +42,7 @@ note: required by a bound in `Ord`
   --> $SRC_DIR/core/src/cmp.rs:LL:COL
 
 error[E0277]: can't compare `BinaryHeap<PriorityQueueEntry<T>>` with `_`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:20:25
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:21:25
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |          ---------- in this derive macro expansion
@@ -53,7 +53,7 @@ LL | struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
    = help: the trait `PartialOrd<_>` is not implemented for `BinaryHeap<PriorityQueueEntry<T>>`
 
 error[E0599]: no method named `cmp` found for struct `BinaryHeap<PriorityQueueEntry<T>>` in the current scope
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ `BinaryHeap<PriorityQueueEntry<T>>` is not an iterator
@@ -61,7 +61,7 @@ LL | #[derive(PartialOrd, AddImpl)]
    = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0609]: no field `height` on type `&PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ unknown field
diff --git a/tests/ui/proc-macro/issue-107113-wrap.rs b/tests/ui/proc-macro/issue-107113-wrap.rs
index 2799e79bb1c..a46cf893d90 100644
--- a/tests/ui/proc-macro/issue-107113-wrap.rs
+++ b/tests/ui/proc-macro/issue-107113-wrap.rs
@@ -1,5 +1,6 @@
 //@ edition:2021
 //@ proc-macro: issue-107113.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_107113;
diff --git a/tests/ui/proc-macro/issue-107113-wrap.stderr b/tests/ui/proc-macro/issue-107113-wrap.stderr
index b541051147d..9b5b0333256 100644
--- a/tests/ui/proc-macro/issue-107113-wrap.stderr
+++ b/tests/ui/proc-macro/issue-107113-wrap.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-107113-wrap.rs:7:1
+  --> $DIR/issue-107113-wrap.rs:8:1
    |
 LL | #[issue_107113::main]
    | ^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-118809.rs b/tests/ui/proc-macro/issue-118809.rs
index a6a3956981a..3ceede7e885 100644
--- a/tests/ui/proc-macro/issue-118809.rs
+++ b/tests/ui/proc-macro/issue-118809.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-118809.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_118809;
diff --git a/tests/ui/proc-macro/issue-118809.stderr b/tests/ui/proc-macro/issue-118809.stderr
index 30b09fd4006..98329fea119 100644
--- a/tests/ui/proc-macro/issue-118809.stderr
+++ b/tests/ui/proc-macro/issue-118809.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-118809.rs:6:10
+  --> $DIR/issue-118809.rs:7:10
    |
 LL | #[derive(Deserialize)]
    |          ^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[derive(Deserialize)]
    |          arguments to this enum variant are incorrect
    |
 help: the type constructed contains `u32` due to the type of the argument passed
-  --> $DIR/issue-118809.rs:6:10
+  --> $DIR/issue-118809.rs:7:10
    |
 LL | #[derive(Deserialize)]
    |          ^^^^^^^^^^^ this argument influences the type of `Some`
diff --git a/tests/ui/proc-macro/issue-38586.rs b/tests/ui/proc-macro/issue-38586.rs
index 88dbb8037be..c9623fd383b 100644
--- a/tests/ui/proc-macro/issue-38586.rs
+++ b/tests/ui/proc-macro/issue-38586.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-38586.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_38586;
diff --git a/tests/ui/proc-macro/issue-38586.stderr b/tests/ui/proc-macro/issue-38586.stderr
index 00491556450..e49d4c83e27 100644
--- a/tests/ui/proc-macro/issue-38586.stderr
+++ b/tests/ui/proc-macro/issue-38586.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `foo` in this scope
-  --> $DIR/issue-38586.rs:6:10
+  --> $DIR/issue-38586.rs:7:10
    |
 LL | #[derive(A)]
    |          ^ not found in this scope
diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
index df236cce6d2..988641b2b9c 100644
--- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
+++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
@@ -4,6 +4,7 @@
 //@ edition:2018
 //@ proc-macro: issue-59191.rs
 //@ needs-unwind (affects error output)
+//@ ignore-backends: gcc
 
 #![feature(custom_inner_attributes)]
 #![issue_59191::no_main]
diff --git a/tests/ui/proc-macro/issue-79148.rs b/tests/ui/proc-macro/issue-79148.rs
index b2248759b5f..7ce6216c842 100644
--- a/tests/ui/proc-macro/issue-79148.rs
+++ b/tests/ui/proc-macro/issue-79148.rs
@@ -1,5 +1,6 @@
 //@ proc-macro: re-export.rs
 //@ edition:2018
+//@ ignore-backends: gcc
 
 extern crate re_export;
 
diff --git a/tests/ui/proc-macro/issue-79148.stderr b/tests/ui/proc-macro/issue-79148.stderr
index 8adc4c6e0db..80a5b1a0855 100644
--- a/tests/ui/proc-macro/issue-79148.stderr
+++ b/tests/ui/proc-macro/issue-79148.stderr
@@ -1,11 +1,11 @@
 error[E0364]: `Variant` is only public within the crate, and cannot be re-exported outside
-  --> $DIR/issue-79148.rs:8:1
+  --> $DIR/issue-79148.rs:9:1
    |
 LL | cause_ice!();
    | ^^^^^^^^^^^^
    |
 note: consider marking `Variant` as `pub` in the imported module
-  --> $DIR/issue-79148.rs:8:1
+  --> $DIR/issue-79148.rs:9:1
    |
 LL | cause_ice!();
    | ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-83510.rs b/tests/ui/proc-macro/issue-83510.rs
index 67469511fc3..d49e1867f1d 100644
--- a/tests/ui/proc-macro/issue-83510.rs
+++ b/tests/ui/proc-macro/issue-83510.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-83510.rs
+//@ ignore-backends: gcc
 
 extern crate issue_83510;
 
diff --git a/tests/ui/proc-macro/issue-83510.stderr b/tests/ui/proc-macro/issue-83510.stderr
index e59b77af3dc..a7c3f5a1d5b 100644
--- a/tests/ui/proc-macro/issue-83510.stderr
+++ b/tests/ui/proc-macro/issue-83510.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `Foo` in this scope
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -7,7 +7,7 @@ LL | issue_83510::dance_like_you_want_to_ice!();
    = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0404]: expected trait, found struct `Box`
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a trait
@@ -15,7 +15,7 @@ LL | issue_83510::dance_like_you_want_to_ice!();
    = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0405]: cannot find trait `Baz` in this scope
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -23,7 +23,7 @@ LL | issue_83510::dance_like_you_want_to_ice!();
    = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: inherent associated types are unstable
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-91800.rs b/tests/ui/proc-macro/issue-91800.rs
index 8cecfad32b5..79cbf8632f0 100644
--- a/tests/ui/proc-macro/issue-91800.rs
+++ b/tests/ui/proc-macro/issue-91800.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-91800-macro.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_91800_macro;
diff --git a/tests/ui/proc-macro/issue-91800.stderr b/tests/ui/proc-macro/issue-91800.stderr
index 63ebc0a552e..be5a8ece384 100644
--- a/tests/ui/proc-macro/issue-91800.stderr
+++ b/tests/ui/proc-macro/issue-91800.stderr
@@ -1,5 +1,5 @@
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:6:10
+  --> $DIR/issue-91800.rs:7:10
    |
 LL | #[derive(MyTrait)]
    |          ^^^^^^^
@@ -7,13 +7,13 @@ LL | #[derive(MyTrait)]
    = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: proc-macro derive produced unparsable tokens
-  --> $DIR/issue-91800.rs:6:10
+  --> $DIR/issue-91800.rs:7:10
    |
 LL | #[derive(MyTrait)]
    |          ^^^^^^^
 
 error: 
-  --> $DIR/issue-91800.rs:6:10
+  --> $DIR/issue-91800.rs:7:10
    |
 LL | #[derive(MyTrait)]
    |          ^^^^^^^
@@ -21,7 +21,7 @@ LL | #[derive(MyTrait)]
    = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:10:1
+  --> $DIR/issue-91800.rs:11:1
    |
 LL | #[attribute_macro]
    | ^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL | #[attribute_macro]
    = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: 
-  --> $DIR/issue-91800.rs:10:1
+  --> $DIR/issue-91800.rs:11:1
    |
 LL | #[attribute_macro]
    | ^^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL | #[attribute_macro]
    = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:15:1
+  --> $DIR/issue-91800.rs:16:1
    |
 LL | fn_macro! {}
    | ^^^^^^^^^^^^
@@ -45,7 +45,7 @@ LL | fn_macro! {}
    = note: this error originates in the macro `fn_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: 
-  --> $DIR/issue-91800.rs:15:1
+  --> $DIR/issue-91800.rs:16:1
    |
 LL | fn_macro! {}
    | ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/lifetimes-rpass.rs b/tests/ui/proc-macro/lifetimes-rpass.rs
index c462b27722f..9b794e695cd 100644
--- a/tests/ui/proc-macro/lifetimes-rpass.rs
+++ b/tests/ui/proc-macro/lifetimes-rpass.rs
@@ -2,6 +2,7 @@
 
 #![allow(unused_variables)]
 //@ proc-macro: lifetimes-rpass.rs
+//@ ignore-backends: gcc
 
 extern crate lifetimes_rpass as lifetimes;
 use lifetimes::*;
diff --git a/tests/ui/proc-macro/lints_in_proc_macros.rs b/tests/ui/proc-macro/lints_in_proc_macros.rs
index 6714b8b6e1d..2c22c787982 100644
--- a/tests/ui/proc-macro/lints_in_proc_macros.rs
+++ b/tests/ui/proc-macro/lints_in_proc_macros.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: bang_proc_macro2.rs
+//@ ignore-backends: gcc
 
 extern crate bang_proc_macro2;
 
diff --git a/tests/ui/proc-macro/lints_in_proc_macros.stderr b/tests/ui/proc-macro/lints_in_proc_macros.stderr
index 244d218608b..016b236bda8 100644
--- a/tests/ui/proc-macro/lints_in_proc_macros.stderr
+++ b/tests/ui/proc-macro/lints_in_proc_macros.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `foobar2` in this scope
-  --> $DIR/lints_in_proc_macros.rs:9:5
+  --> $DIR/lints_in_proc_macros.rs:10:5
    |
 LL |     bang_proc_macro2!();
    |     ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
diff --git a/tests/ui/proc-macro/load-two.rs b/tests/ui/proc-macro/load-two.rs
index 608379949e6..197e7845db3 100644
--- a/tests/ui/proc-macro/load-two.rs
+++ b/tests/ui/proc-macro/load-two.rs
@@ -4,6 +4,7 @@
 #![allow(dead_code)]
 //@ proc-macro: derive-atob.rs
 //@ proc-macro: derive-ctod.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_atob;
diff --git a/tests/ui/proc-macro/macro-crate-multi-decorator.rs b/tests/ui/proc-macro/macro-crate-multi-decorator.rs
index c4f02e7adfc..e247c9526a4 100644
--- a/tests/ui/proc-macro/macro-crate-multi-decorator.rs
+++ b/tests/ui/proc-macro/macro-crate-multi-decorator.rs
@@ -2,6 +2,7 @@
 
 //@ check-pass
 //@ proc-macro: duplicate.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate duplicate;
diff --git a/tests/ui/proc-macro/macro_rules_edition_from_pm.rs b/tests/ui/proc-macro/macro_rules_edition_from_pm.rs
index 8fc7d909749..fc3ae3ef2c8 100644
--- a/tests/ui/proc-macro/macro_rules_edition_from_pm.rs
+++ b/tests/ui/proc-macro/macro_rules_edition_from_pm.rs
@@ -7,6 +7,7 @@
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
 //@ check-pass
+//@ ignore-backends: gcc
 
 // This checks how the expr fragment specifier works.
 macro_rules_edition_pm::make_edition_macro!{}
diff --git a/tests/ui/proc-macro/match-expander.rs b/tests/ui/proc-macro/match-expander.rs
index 23e5746c540..b7245c7e682 100644
--- a/tests/ui/proc-macro/match-expander.rs
+++ b/tests/ui/proc-macro/match-expander.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: match-expander.rs
+//@ ignore-backends: gcc
 // Ensure that we don't point at macro invocation when providing inference contexts.
 
 #[macro_use]
diff --git a/tests/ui/proc-macro/match-expander.stderr b/tests/ui/proc-macro/match-expander.stderr
index b77468ec60a..d2423336b1d 100644
--- a/tests/ui/proc-macro/match-expander.stderr
+++ b/tests/ui/proc-macro/match-expander.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/match-expander.rs:8:5
+  --> $DIR/match-expander.rs:9:5
    |
 LL |     match_expander::matcher!();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `S`, found `bool`
diff --git a/tests/ui/proc-macro/mixed-site-span.rs b/tests/ui/proc-macro/mixed-site-span.rs
index 442b440c121..98a022632cd 100644
--- a/tests/ui/proc-macro/mixed-site-span.rs
+++ b/tests/ui/proc-macro/mixed-site-span.rs
@@ -2,6 +2,7 @@
 
 //@ aux-build: token-site-span.rs
 //@ proc-macro: mixed-site-span.rs
+//@ ignore-backends: gcc
 
 extern crate mixed_site_span;
 extern crate token_site_span;
diff --git a/tests/ui/proc-macro/mixed-site-span.stderr b/tests/ui/proc-macro/mixed-site-span.stderr
index d62031a853c..2d2d55fe148 100644
--- a/tests/ui/proc-macro/mixed-site-span.stderr
+++ b/tests/ui/proc-macro/mixed-site-span.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:47:5
+  --> $DIR/mixed-site-span.rs:48:5
    |
 LL |     invoke_with_crate!{input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -7,7 +7,7 @@ LL |     invoke_with_crate!{input proc_macro_item}
    = note: this error originates in the macro `invoke_with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:48:5
+  --> $DIR/mixed-site-span.rs:49:5
    |
 LL |     invoke_with_ident!{input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -15,7 +15,7 @@ LL |     invoke_with_ident!{input proc_macro_item}
    = note: this error originates in the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:49:5
+  --> $DIR/mixed-site-span.rs:50:5
    |
 LL |     invoke_with_crate!{call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -23,7 +23,7 @@ LL |     invoke_with_crate!{call proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:50:5
+  --> $DIR/mixed-site-span.rs:51:5
    |
 LL |     invoke_with_ident!{call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -31,7 +31,7 @@ LL |     invoke_with_ident!{call proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:51:5
+  --> $DIR/mixed-site-span.rs:52:5
    |
 LL |     invoke_with_ident!{hello call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -39,7 +39,7 @@ LL |     invoke_with_ident!{hello call proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate::proc_macro_item`
-  --> $DIR/mixed-site-span.rs:54:5
+  --> $DIR/mixed-site-span.rs:55:5
    |
 LL |     invoke_with_ident!{krate input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -50,7 +50,7 @@ LL |     invoke_with_ident!{krate input proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate::proc_macro_item`
-  --> $DIR/mixed-site-span.rs:55:5
+  --> $DIR/mixed-site-span.rs:56:5
    |
 LL |     with_crate!{krate input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -61,7 +61,7 @@ LL |     with_crate!{krate input proc_macro_item}
    = note: this error originates in the macro `with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:56:5
+  --> $DIR/mixed-site-span.rs:57:5
    |
 LL |     with_crate!{krate call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -72,7 +72,7 @@ LL |     with_crate!{krate call proc_macro_item}
    = note: this error originates in the macro `with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:60:28
+  --> $DIR/mixed-site-span.rs:61:28
    |
 LL |         invoke_with_ident!{$crate input proc_macro_item}
    |                            ^^^^^^       --------------- help: a similar name exists in the module: `proc_macro_rules`
@@ -85,7 +85,7 @@ LL |     test!();
    = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:61:21
+  --> $DIR/mixed-site-span.rs:62:21
    |
 LL |         with_crate!{$crate input proc_macro_item}
    |                     ^^^^^^       --------------- help: a similar name exists in the module: `proc_macro_rules`
@@ -98,7 +98,7 @@ LL |     test!();
    = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:62:9
+  --> $DIR/mixed-site-span.rs:63:9
    |
 LL |         with_crate!{$crate call proc_macro_item}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -112,7 +112,7 @@ LL |     test!();
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:67:5
+  --> $DIR/mixed-site-span.rs:68:5
    |
 LL |     test!();
    |     ^^^^^^^ no `proc_macro_item` in the root
@@ -120,7 +120,7 @@ LL |     test!();
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate::TokenItem`
-  --> $DIR/mixed-site-span.rs:87:5
+  --> $DIR/mixed-site-span.rs:88:5
    |
 LL |     invoke_with_ident!{krate input TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -133,7 +133,7 @@ LL |     quote!(use $krate::$ident as token_site_span::TokenItem as _;)
    |                                  +++++++++++++++++++++++++++++
 
 error[E0432]: unresolved import `$crate::TokenItem`
-  --> $DIR/mixed-site-span.rs:88:5
+  --> $DIR/mixed-site-span.rs:89:5
    |
 LL |     with_crate!{krate input TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -146,7 +146,7 @@ LL |     quote!(use $krate::$ident as token_site_span::TokenItem as _;)
    |                                  +++++++++++++++++++++++++++++
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:89:5
+  --> $DIR/mixed-site-span.rs:90:5
    |
 LL |     with_crate!{krate call TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -159,7 +159,7 @@ LL +     token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:92:5
+  --> $DIR/mixed-site-span.rs:93:5
    |
 LL |     invoke_with_crate!{mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -173,7 +173,7 @@ LL +     ($s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:93:5
+  --> $DIR/mixed-site-span.rs:94:5
    |
 LL |     invoke_with_ident!{mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -187,7 +187,7 @@ LL +     ($s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:94:5
+  --> $DIR/mixed-site-span.rs:95:5
    |
 LL |     invoke_with_ident!{krate mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -201,7 +201,7 @@ LL +     ($m:ident $s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:95:5
+  --> $DIR/mixed-site-span.rs:96:5
    |
 LL |     with_crate!{krate mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -214,7 +214,7 @@ LL +     token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:99:28
+  --> $DIR/mixed-site-span.rs:100:28
    |
 LL |         invoke_with_ident!{$crate input TokenItem}
    |                            ^^^^^^ no `TokenItem` in the root
@@ -230,7 +230,7 @@ LL +         invoke_with_ident!{token_site_span::TokenItem as _ input TokenItem}
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:100:21
+  --> $DIR/mixed-site-span.rs:101:21
    |
 LL |         with_crate!{$crate input TokenItem}
    |                     ^^^^^^ no `TokenItem` in the root
@@ -246,7 +246,7 @@ LL +         with_crate!{token_site_span::TokenItem as _ input TokenItem}
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:101:9
+  --> $DIR/mixed-site-span.rs:102:9
    |
 LL |         with_crate!{$crate call TokenItem}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -262,7 +262,7 @@ LL +         token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:108:5
+  --> $DIR/mixed-site-span.rs:109:5
    |
 LL |     test!();
    |     ^^^^^^^ no `TokenItem` in the root
@@ -276,7 +276,7 @@ LL +     ($m:ident $s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:105:9
+  --> $DIR/mixed-site-span.rs:106:9
    |
 LL |         with_crate!{$crate mixed TokenItem}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -292,7 +292,7 @@ LL +         token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:129:5
+  --> $DIR/mixed-site-span.rs:130:5
    |
 LL |     invoke_with_crate!{input ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -306,7 +306,7 @@ LL +     ($s:ident $i:ident) => { with_crate!{ItemUse as _ $s $i} };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:130:5
+  --> $DIR/mixed-site-span.rs:131:5
    |
 LL |     invoke_with_ident!{input ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -320,7 +320,7 @@ LL +     ($s:ident $i:ident) => { with_crate!{ItemUse as _ $s $i} };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:133:5
+  --> $DIR/mixed-site-span.rs:134:5
    |
 LL |     invoke_with_crate!{mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -334,7 +334,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:134:5
+  --> $DIR/mixed-site-span.rs:135:5
    |
 LL |     invoke_with_ident!{mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -348,7 +348,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:135:5
+  --> $DIR/mixed-site-span.rs:136:5
    |
 LL |     invoke_with_ident!{krate mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -362,7 +362,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:136:5
+  --> $DIR/mixed-site-span.rs:137:5
    |
 LL |     with_crate!{krate mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -375,7 +375,7 @@ LL +     ItemUse as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:138:5
+  --> $DIR/mixed-site-span.rs:139:5
    |
 LL |     invoke_with_crate!{call ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -389,7 +389,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:139:5
+  --> $DIR/mixed-site-span.rs:140:5
    |
 LL |     invoke_with_ident!{call ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -403,7 +403,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:140:5
+  --> $DIR/mixed-site-span.rs:141:5
    |
 LL |     invoke_with_ident!{hello call ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -417,7 +417,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:148:5
+  --> $DIR/mixed-site-span.rs:149:5
    |
 LL |     test!();
    |     ^^^^^^^ no `ItemUse` in the root
@@ -431,7 +431,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:144:9
+  --> $DIR/mixed-site-span.rs:145:9
    |
 LL |         with_crate!{$crate mixed ItemUse}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -447,7 +447,7 @@ LL +         ItemUse as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:148:5
+  --> $DIR/mixed-site-span.rs:149:5
    |
 LL |     test!();
    |     ^^^^^^^ no `ItemUse` in the root
@@ -461,7 +461,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:153:1
+  --> $DIR/mixed-site-span.rs:154:1
    |
 LL | use_input_crate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -469,7 +469,7 @@ LL | use_input_crate!{proc_macro_item}
    = note: this error originates in the macro `use_input_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:154:1
+  --> $DIR/mixed-site-span.rs:155:1
    |
 LL | use_input_krate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -477,7 +477,7 @@ LL | use_input_krate!{proc_macro_item}
    = note: this error originates in the macro `use_input_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:157:1
+  --> $DIR/mixed-site-span.rs:158:1
    |
 LL | use_call_crate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -485,7 +485,7 @@ LL | use_call_crate!{proc_macro_item}
    = note: this error originates in the macro `use_call_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:158:1
+  --> $DIR/mixed-site-span.rs:159:1
    |
 LL | use_call_krate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -493,7 +493,7 @@ LL | use_call_krate!{proc_macro_item}
    = note: this error originates in the macro `use_call_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:163:1
+  --> $DIR/mixed-site-span.rs:164:1
    |
 LL | use_mixed_crate!{TokenItem}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -507,7 +507,7 @@ LL +     token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:164:1
+  --> $DIR/mixed-site-span.rs:165:1
    |
 LL | use_mixed_krate!{TokenItem}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -521,7 +521,7 @@ LL + token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:169:1
+  --> $DIR/mixed-site-span.rs:170:1
    |
 LL | use_input_crate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -529,7 +529,7 @@ LL | use_input_crate!{ItemUse}
    = note: this error originates in the macro `use_input_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:170:1
+  --> $DIR/mixed-site-span.rs:171:1
    |
 LL | use_input_krate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -537,7 +537,7 @@ LL | use_input_krate!{ItemUse}
    = note: this error originates in the macro `use_input_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:171:1
+  --> $DIR/mixed-site-span.rs:172:1
    |
 LL | use_mixed_crate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -545,7 +545,7 @@ LL | use_mixed_crate!{ItemUse}
    = note: this error originates in the macro `use_mixed_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:172:1
+  --> $DIR/mixed-site-span.rs:173:1
    |
 LL | use_mixed_krate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -553,7 +553,7 @@ LL | use_mixed_krate!{ItemUse}
    = note: this error originates in the macro `use_mixed_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:173:1
+  --> $DIR/mixed-site-span.rs:174:1
    |
 LL | use_call_crate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -561,7 +561,7 @@ LL | use_call_crate!{ItemUse}
    = note: this error originates in the macro `use_call_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:174:1
+  --> $DIR/mixed-site-span.rs:175:1
    |
 LL | use_call_krate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -569,7 +569,7 @@ LL | use_call_krate!{ItemUse}
    = note: this error originates in the macro `use_call_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0426]: use of undeclared label `'label_use`
-  --> $DIR/mixed-site-span.rs:21:9
+  --> $DIR/mixed-site-span.rs:22:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
@@ -577,7 +577,7 @@ LL |         proc_macro_rules!();
    = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `ItemUse` in crate `$crate`
-  --> $DIR/mixed-site-span.rs:21:9
+  --> $DIR/mixed-site-span.rs:22:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^ not found in `$crate`
@@ -589,7 +589,7 @@ LL + use ItemUse;
    |
 
 error[E0425]: cannot find value `local_use` in this scope
-  --> $DIR/mixed-site-span.rs:21:9
+  --> $DIR/mixed-site-span.rs:22:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
@@ -597,7 +597,7 @@ LL |         proc_macro_rules!();
    = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
-  --> $DIR/mixed-site-span.rs:26:9
+  --> $DIR/mixed-site-span.rs:27:9
    |
 LL |         local_def;
    |         ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
diff --git a/tests/ui/proc-macro/modify-ast.rs b/tests/ui/proc-macro/modify-ast.rs
index 9e890f3ebaa..75aea597ed5 100644
--- a/tests/ui/proc-macro/modify-ast.rs
+++ b/tests/ui/proc-macro/modify-ast.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: modify-ast.rs
+//@ ignore-backends: gcc
 
 extern crate modify_ast;
 
diff --git a/tests/ui/proc-macro/parent-source-spans.rs b/tests/ui/proc-macro/parent-source-spans.rs
index cc3ac795f7f..f675f6fb6f7 100644
--- a/tests/ui/proc-macro/parent-source-spans.rs
+++ b/tests/ui/proc-macro/parent-source-spans.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: parent-source-spans.rs
+//@ ignore-backends: gcc
 
 #![feature(decl_macro)]
 
diff --git a/tests/ui/proc-macro/parent-source-spans.stderr b/tests/ui/proc-macro/parent-source-spans.stderr
index db1eed5e458..28a70eea873 100644
--- a/tests/ui/proc-macro/parent-source-spans.stderr
+++ b/tests/ui/proc-macro/parent-source-spans.stderr
@@ -1,5 +1,5 @@
 error: first final: "hello"
-  --> $DIR/parent-source-spans.rs:16:12
+  --> $DIR/parent-source-spans.rs:17:12
    |
 LL |     three!($a, $b);
    |            ^^
@@ -10,7 +10,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `two` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "world"
-  --> $DIR/parent-source-spans.rs:16:16
+  --> $DIR/parent-source-spans.rs:17:16
    |
 LL |     three!($a, $b);
    |                ^^
@@ -21,7 +21,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `two` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "hello"
-  --> $DIR/parent-source-spans.rs:10:5
+  --> $DIR/parent-source-spans.rs:11:5
    |
 LL |     two!($a, $b);
    |     ^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second parent: "world"
-  --> $DIR/parent-source-spans.rs:10:5
+  --> $DIR/parent-source-spans.rs:11:5
    |
 LL |     two!($a, $b);
    |     ^^^^^^^^^^^^
@@ -43,31 +43,31 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first grandparent: "hello"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: second grandparent: "world"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: first source: "hello"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: second source: "world"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: first final: "yay"
-  --> $DIR/parent-source-spans.rs:16:12
+  --> $DIR/parent-source-spans.rs:17:12
    |
 LL |     three!($a, $b);
    |            ^^
@@ -78,7 +78,7 @@ LL |     two!("yay", "rust");
    = note: this error originates in the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "rust"
-  --> $DIR/parent-source-spans.rs:16:16
+  --> $DIR/parent-source-spans.rs:17:16
    |
 LL |     three!($a, $b);
    |                ^^
@@ -89,55 +89,55 @@ LL |     two!("yay", "rust");
    = note: this error originates in the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "yay"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: second parent: "rust"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: first source: "yay"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: second source: "rust"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: first final: "hip"
-  --> $DIR/parent-source-spans.rs:48:12
+  --> $DIR/parent-source-spans.rs:49:12
    |
 LL |     three!("hip", "hop");
    |            ^^^^^
 
 error: second final: "hop"
-  --> $DIR/parent-source-spans.rs:48:19
+  --> $DIR/parent-source-spans.rs:49:19
    |
 LL |     three!("hip", "hop");
    |                   ^^^^^
 
 error: first source: "hip"
-  --> $DIR/parent-source-spans.rs:48:12
+  --> $DIR/parent-source-spans.rs:49:12
    |
 LL |     three!("hip", "hop");
    |            ^^^^^
 
 error: second source: "hop"
-  --> $DIR/parent-source-spans.rs:48:19
+  --> $DIR/parent-source-spans.rs:49:19
    |
 LL |     three!("hip", "hop");
    |                   ^^^^^
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:29:5
+  --> $DIR/parent-source-spans.rs:30:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@@ -152,7 +152,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:29:5
+  --> $DIR/parent-source-spans.rs:30:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@@ -167,7 +167,7 @@ LL |     two!("yay", "rust");
    = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:29:5
+  --> $DIR/parent-source-spans.rs:30:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
diff --git a/tests/ui/proc-macro/quote/basic.rs b/tests/ui/proc-macro/quote/basic.rs
index 0336dbb7856..4c6fb2408fb 100644
--- a/tests/ui/proc-macro/quote/basic.rs
+++ b/tests/ui/proc-macro/quote/basic.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: basic.rs
+//@ ignore-backends: gcc
 
 extern crate basic;
 
diff --git a/tests/ui/proc-macro/span-api-tests.rs b/tests/ui/proc-macro/span-api-tests.rs
index 792859ed05b..12832ba1163 100644
--- a/tests/ui/proc-macro/span-api-tests.rs
+++ b/tests/ui/proc-macro/span-api-tests.rs
@@ -2,6 +2,7 @@
 //@ proc-macro: span-api-tests.rs
 //@ aux-build:span-test-macros.rs
 //@ compile-flags: -Ztranslate-remapped-path-to-local-path=yes
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate span_test_macros;
diff --git a/tests/ui/proc-macro/span-from-proc-macro.rs b/tests/ui/proc-macro/span-from-proc-macro.rs
index 4e12a695a5c..24a28d53476 100644
--- a/tests/ui/proc-macro/span-from-proc-macro.rs
+++ b/tests/ui/proc-macro/span-from-proc-macro.rs
@@ -1,6 +1,7 @@
 //@ proc-macro: custom-quote.rs
 //@ proc-macro: span-from-proc-macro.rs
 //@ compile-flags: -Z macro-backtrace
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate span_from_proc_macro;
diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr
index c79ab04eadf..945a5620fac 100644
--- a/tests/ui/proc-macro/span-from-proc-macro.stderr
+++ b/tests/ui/proc-macro/span-from-proc-macro.stderr
@@ -7,7 +7,7 @@ LL | pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> Tok
 LL |             field: MissingType
    |                    ^^^^^^^^^^^ not found in this scope
    |
-  ::: $DIR/span-from-proc-macro.rs:8:1
+  ::: $DIR/span-from-proc-macro.rs:9:1
    |
 LL | #[error_from_attribute]
    | ----------------------- in this attribute macro expansion
@@ -21,7 +21,7 @@ LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream {
 LL |             Variant(OtherMissingType)
    |                     ^^^^^^^^^^^^^^^^ not found in this scope
    |
-  ::: $DIR/span-from-proc-macro.rs:11:10
+  ::: $DIR/span-from-proc-macro.rs:12:10
    |
 LL | #[derive(ErrorFromDerive)]
    |          --------------- in this derive macro expansion
@@ -35,7 +35,7 @@ LL |     custom_quote::custom_quote! {
 LL |         my_ident
    |         ^^^^^^^^ not found in this scope
    |
-  ::: $DIR/span-from-proc-macro.rs:16:5
+  ::: $DIR/span-from-proc-macro.rs:17:5
    |
 LL |     other_error_from_bang!();
    |     ------------------------ in this macro invocation
@@ -51,7 +51,7 @@ LL |             let bang_error: bool = 25;
 LL | pub fn error_from_bang(_input: TokenStream) -> TokenStream {
    | ---------------------------------------------------------- in this expansion of `error_from_bang!`
    |
-  ::: $DIR/span-from-proc-macro.rs:15:5
+  ::: $DIR/span-from-proc-macro.rs:16:5
    |
 LL |     error_from_bang!();
    |     ------------------ in this macro invocation
diff --git a/tests/ui/proc-macro/weird-hygiene.rs b/tests/ui/proc-macro/weird-hygiene.rs
index de55484109a..8d8427d0e41 100644
--- a/tests/ui/proc-macro/weird-hygiene.rs
+++ b/tests/ui/proc-macro/weird-hygiene.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: weird-hygiene.rs
+//@ ignore-backends: gcc
 
 #![feature(stmt_expr_attributes)]
 #![feature(proc_macro_hygiene)]
diff --git a/tests/ui/proc-macro/weird-hygiene.stderr b/tests/ui/proc-macro/weird-hygiene.stderr
index 256e68e8970..0cfac3f89a0 100644
--- a/tests/ui/proc-macro/weird-hygiene.stderr
+++ b/tests/ui/proc-macro/weird-hygiene.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `hidden_ident` in this scope
-  --> $DIR/weird-hygiene.rs:23:43
+  --> $DIR/weird-hygiene.rs:24:43
    |
 LL |             Value = (stringify!($tokens + hidden_ident), 1).1
    |                                           ^^^^^^^^^^^^ not found in this scope
@@ -10,7 +10,7 @@ LL |     other!(50);
    = note: this error originates in the macro `inner` which comes from the expansion of the macro `other` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `hidden_ident` in this scope
-  --> $DIR/weird-hygiene.rs:34:13
+  --> $DIR/weird-hygiene.rs:35:13
    |
 LL |             hidden_ident
    |             ^^^^^^^^^^^^ not found in this scope
diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs
index 1fddffeb770..67bbd16fba7 100644
--- a/tests/ui/process/multi-panic.rs
+++ b/tests/ui/process/multi-panic.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-subprocess
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 fn check_for_no_backtrace(test: std::process::Output) {
     assert!(!test.status.success());
diff --git a/tests/ui/resolve/prelude-order.rs b/tests/ui/resolve/prelude-order.rs
index a3f194270d4..c6683bdff22 100644
--- a/tests/ui/resolve/prelude-order.rs
+++ b/tests/ui/resolve/prelude-order.rs
@@ -1,5 +1,6 @@
 //@ proc-macro:macro_helpers.rs
 //@ compile-flags: --crate-type=lib
+//@ ignore-backends: gcc
 
 /* There are 5 preludes and 3 namespaces. Test the order in which they are resolved.
  * See https://doc.rust-lang.org/nightly/reference/names/preludes.html.
diff --git a/tests/ui/resolve/prelude-order.stderr b/tests/ui/resolve/prelude-order.stderr
index 1b9cc94285a..4dad39fb6d2 100644
--- a/tests/ui/resolve/prelude-order.stderr
+++ b/tests/ui/resolve/prelude-order.stderr
@@ -1,17 +1,17 @@
 error[E0433]: failed to resolve: could not find `inner` in `type_ns`
-  --> $DIR/prelude-order.rs:61:12
+  --> $DIR/prelude-order.rs:62:12
    |
 LL | #[type_ns::inner]
    |            ^^^^^ could not find `inner` in `type_ns`
 
 error[E0433]: failed to resolve: could not find `inner` in `usize`
-  --> $DIR/prelude-order.rs:73:10
+  --> $DIR/prelude-order.rs:74:10
    |
 LL | #[usize::inner]
    |          ^^^^^ could not find `inner` in `usize`
 
 error[E0573]: expected type, found crate `Option`
-  --> $DIR/prelude-order.rs:79:12
+  --> $DIR/prelude-order.rs:80:12
    |
 LL | fn e2() -> Option<i32> { None }
    |            ^^^^^^^^^^^ not a type
@@ -22,7 +22,7 @@ LL + use std::option::Option;
    |
 
 error[E0308]: mismatched types
-  --> $DIR/prelude-order.rs:82:1
+  --> $DIR/prelude-order.rs:83:1
    |
 LL | #[test]
    | ^^^^^^^- help: try adding a return type: `-> &'static str`
@@ -32,7 +32,7 @@ LL | #[test]
    = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
-  --> $DIR/prelude-order.rs:86:1
+  --> $DIR/prelude-order.rs:87:1
    |
 LL | #[global_allocator]
    | ^^^^^^^^^^^^^^^^^^^- help: try adding a return type: `-> &'static str`
diff --git a/tests/ui/resolve/unused-macro-import.rs b/tests/ui/resolve/unused-macro-import.rs
new file mode 100644
index 00000000000..e85f7a43993
--- /dev/null
+++ b/tests/ui/resolve/unused-macro-import.rs
@@ -0,0 +1,13 @@
+//@ check-pass
+
+#![warn(unused_imports)]
+
+#[macro_export]
+macro_rules! mac { () => {} }
+
+fn main() {
+    // Unused, `mac` as `macro_rules!` is already in scope and has higher priority.
+    use crate::mac; //~ WARN unused import: `crate::mac`
+
+    mac!();
+}
diff --git a/tests/ui/resolve/unused-macro-import.stderr b/tests/ui/resolve/unused-macro-import.stderr
new file mode 100644
index 00000000000..5f9813808a0
--- /dev/null
+++ b/tests/ui/resolve/unused-macro-import.stderr
@@ -0,0 +1,14 @@
+warning: unused import: `crate::mac`
+  --> $DIR/unused-macro-import.rs:10:9
+   |
+LL |     use crate::mac;
+   |         ^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/unused-macro-import.rs:3:9
+   |
+LL | #![warn(unused_imports)]
+   |         ^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs
index 414d5518e1f..2387dfb2bc5 100644
--- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs
@@ -7,6 +7,7 @@
 //@ check-pass
 
 //@ proc-macro: count.rs
+//@ ignore-backends: gcc
 extern crate count;
 
 const _: () = {
diff --git a/tests/ui/runtime/backtrace-debuginfo.rs b/tests/ui/runtime/backtrace-debuginfo.rs
index 5e91f22aec0..d3b4d057e6d 100644
--- a/tests/ui/runtime/backtrace-debuginfo.rs
+++ b/tests/ui/runtime/backtrace-debuginfo.rs
@@ -19,6 +19,7 @@
 // FIXME(#117097): backtrace (possibly unwinding mechanism) seems to be different on at least
 // `i686-mingw` (32-bit windows-gnu)? cc #128911.
 //@ ignore-windows-gnu
+//@ ignore-backends: gcc
 
 use std::env;
 
diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs
index 913d3637c8f..3e092728f29 100644
--- a/tests/ui/runtime/out-of-stack.rs
+++ b/tests/ui/runtime/out-of-stack.rs
@@ -10,6 +10,7 @@
 //@ ignore-tvos stack overflow handlers aren't enabled
 //@ ignore-watchos stack overflow handlers aren't enabled
 //@ ignore-visionos stack overflow handlers aren't enabled
+//@ ignore-backends: gcc
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
index e3070ba150b..3a42434494d 100644
--- a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
+++ b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
@@ -3,6 +3,7 @@
 //@ run-rustfix
 //@ rustfix-only-machine-applicable
 //@ check-pass
+//@ ignore-backends: gcc
 
 #![warn(rust_2018_compatibility)]
 
diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/suggestions-not-always-applicable.rs
index e3070ba150b..3a42434494d 100644
--- a/tests/ui/rust-2018/suggestions-not-always-applicable.rs
+++ b/tests/ui/rust-2018/suggestions-not-always-applicable.rs
@@ -3,6 +3,7 @@
 //@ run-rustfix
 //@ rustfix-only-machine-applicable
 //@ check-pass
+//@ ignore-backends: gcc
 
 #![warn(rust_2018_compatibility)]
 
diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs
index eec1b859c20..456649f23ca 100644
--- a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs
+++ b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ edition:2021
 //@ proc-macro: reserved-prefixes-macro-2018.rs
+//@ ignore-backends: gcc
 
 extern crate reserved_prefixes_macro_2018 as m2018;
 
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
index ead2ab40b77..ddb32c26717 100644
--- a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
+++ b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ edition:2024
 //@ proc-macro: reserved-guarded-strings-macro-2021.rs
+//@ ignore-backends: gcc
 
 extern crate reserved_guarded_strings_macro_2021 as m2021;
 
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
index e2c504e708c..8b7073649b7 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
@@ -6,6 +6,7 @@
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
 //@ proc-macro: unsafe-attributes-pm.rs
+//@ ignore-backends: gcc
 
 unsafe_attributes_pm::missing_unsafe!();
 
diff --git a/tests/ui/sanitizer/cfi/transparent-has-regions.rs b/tests/ui/sanitizer/cfi/transparent-has-regions.rs
index b82850133c1..3e9893df23c 100644
--- a/tests/ui/sanitizer/cfi/transparent-has-regions.rs
+++ b/tests/ui/sanitizer/cfi/transparent-has-regions.rs
@@ -3,6 +3,7 @@
 //@ no-prefer-dynamic
 //@ only-x86_64-unknown-linux-gnu
 //@ build-pass
+//@ ignore-backends: gcc
 
 pub trait Trait {}
 
diff --git a/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs b/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs
index be81c7bd0ca..ac2b95b6398 100644
--- a/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs
+++ b/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs
@@ -7,6 +7,7 @@
 //@ no-prefer-dynamic
 //@ only-x86_64-unknown-linux-gnu
 //@ build-pass
+//@ ignore-backends: gcc
 
 use std::future::Future;
 
diff --git a/tests/ui/sepcomp/sepcomp-lib-lto.rs b/tests/ui/sepcomp/sepcomp-lib-lto.rs
index 2166a8fd031..f47ea25a4fc 100644
--- a/tests/ui/sepcomp/sepcomp-lib-lto.rs
+++ b/tests/ui/sepcomp/sepcomp-lib-lto.rs
@@ -5,6 +5,7 @@
 //@ aux-build:sepcomp_lib.rs
 //@ compile-flags: -C lto -g
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 extern crate sepcomp_lib;
 use sepcomp_lib::a::one;
diff --git a/tests/ui/sepcomp/sepcomp-unwind.rs b/tests/ui/sepcomp/sepcomp-unwind.rs
index 95591676b5e..0038e887c4e 100644
--- a/tests/ui/sepcomp/sepcomp-unwind.rs
+++ b/tests/ui/sepcomp/sepcomp-unwind.rs
@@ -3,6 +3,7 @@
 #![allow(dead_code)]
 //@ compile-flags: -C codegen-units=3
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Test unwinding through multiple compilation units.
 
diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs
index caec607d6fe..d67ff6b33b7 100644
--- a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs
+++ b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 
 #![feature(repr_simd, core_intrinsics)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr b/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
index a27a8d721fb..a2646c8e848 100644
--- a/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
+++ b/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
@@ -1,167 +1,167 @@
 error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:68:9
+  --> $DIR/generic-arithmetic-2.rs:69:9
    |
 LL |         simd_add(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_sub` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:70:9
+  --> $DIR/generic-arithmetic-2.rs:71:9
    |
 LL |         simd_sub(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_mul` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:72:9
+  --> $DIR/generic-arithmetic-2.rs:73:9
    |
 LL |         simd_mul(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_div` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:74:9
+  --> $DIR/generic-arithmetic-2.rs:75:9
    |
 LL |         simd_div(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shl` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:76:9
+  --> $DIR/generic-arithmetic-2.rs:77:9
    |
 LL |         simd_shl(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shr` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:78:9
+  --> $DIR/generic-arithmetic-2.rs:79:9
    |
 LL |         simd_shr(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shl` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:80:9
+  --> $DIR/generic-arithmetic-2.rs:81:9
    |
 LL |         simd_funnel_shl(0, 0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shr` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:82:9
+  --> $DIR/generic-arithmetic-2.rs:83:9
    |
 LL |         simd_funnel_shr(0, 0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_and` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:84:9
+  --> $DIR/generic-arithmetic-2.rs:85:9
    |
 LL |         simd_and(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_or` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:86:9
+  --> $DIR/generic-arithmetic-2.rs:87:9
    |
 LL |         simd_or(0, 0);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_xor` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:88:9
+  --> $DIR/generic-arithmetic-2.rs:89:9
    |
 LL |         simd_xor(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_neg` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:91:9
+  --> $DIR/generic-arithmetic-2.rs:92:9
    |
 LL |         simd_neg(0);
    |         ^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bswap` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:93:9
+  --> $DIR/generic-arithmetic-2.rs:94:9
    |
 LL |         simd_bswap(0);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bitreverse` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:95:9
+  --> $DIR/generic-arithmetic-2.rs:96:9
    |
 LL |         simd_bitreverse(0);
    |         ^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_ctlz` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:97:9
+  --> $DIR/generic-arithmetic-2.rs:98:9
    |
 LL |         simd_ctlz(0);
    |         ^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_cttz` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:99:9
+  --> $DIR/generic-arithmetic-2.rs:100:9
    |
 LL |         simd_cttz(0);
    |         ^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shl` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:102:9
+  --> $DIR/generic-arithmetic-2.rs:103:9
    |
 LL |         simd_shl(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shr` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:104:9
+  --> $DIR/generic-arithmetic-2.rs:105:9
    |
 LL |         simd_shr(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shl` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:106:9
+  --> $DIR/generic-arithmetic-2.rs:107:9
    |
 LL |         simd_funnel_shl(z, z, z);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shr` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:108:9
+  --> $DIR/generic-arithmetic-2.rs:109:9
    |
 LL |         simd_funnel_shr(z, z, z);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_and` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:110:9
+  --> $DIR/generic-arithmetic-2.rs:111:9
    |
 LL |         simd_and(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_or` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:112:9
+  --> $DIR/generic-arithmetic-2.rs:113:9
    |
 LL |         simd_or(z, z);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_xor` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:114:9
+  --> $DIR/generic-arithmetic-2.rs:115:9
    |
 LL |         simd_xor(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bswap` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:116:9
+  --> $DIR/generic-arithmetic-2.rs:117:9
    |
 LL |         simd_bswap(z);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bitreverse` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:118:9
+  --> $DIR/generic-arithmetic-2.rs:119:9
    |
 LL |         simd_bitreverse(z);
    |         ^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_ctlz` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:120:9
+  --> $DIR/generic-arithmetic-2.rs:121:9
    |
 LL |         simd_ctlz(z);
    |         ^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_ctpop` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:122:9
+  --> $DIR/generic-arithmetic-2.rs:123:9
    |
 LL |         simd_ctpop(z);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_cttz` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:124:9
+  --> $DIR/generic-arithmetic-2.rs:125:9
    |
 LL |         simd_cttz(z);
    |         ^^^^^^^^^^^^
diff --git a/tests/ui/simd/intrinsic/generic-elements.rs b/tests/ui/simd/intrinsic/generic-elements.rs
index 905299a9289..08d1e3ce944 100644
--- a/tests/ui/simd/intrinsic/generic-elements.rs
+++ b/tests/ui/simd/intrinsic/generic-elements.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 
 #![feature(
     repr_simd,
diff --git a/tests/ui/simd/intrinsic/generic-elements.stderr b/tests/ui/simd/intrinsic/generic-elements.stderr
index 3779aa86cee..a32a923633b 100644
--- a/tests/ui/simd/intrinsic/generic-elements.stderr
+++ b/tests/ui/simd/intrinsic/generic-elements.stderr
@@ -1,125 +1,125 @@
 error[E0511]: invalid monomorphization of `simd_insert` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:51:9
+  --> $DIR/generic-elements.rs:52:9
    |
 LL |         simd_insert(0, 0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_insert` intrinsic: expected inserted type `i32` (element of input `i32x4`), found `f64`
-  --> $DIR/generic-elements.rs:53:9
+  --> $DIR/generic-elements.rs:54:9
    |
 LL |         simd_insert(x, 0, 1.0);
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_extract` intrinsic: expected return type `i32` (element of input `i32x4`), found `f32`
-  --> $DIR/generic-elements.rs:55:9
+  --> $DIR/generic-elements.rs:56:9
    |
 LL |         simd_extract::<_, f32>(x, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:59:9
+  --> $DIR/generic-elements.rs:60:9
    |
 LL |         simd_shuffle::<i32, _, i32>(0, 0, IDX2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:62:9
+  --> $DIR/generic-elements.rs:63:9
    |
 LL |         simd_shuffle::<i32, _, i32>(0, 0, IDX4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:65:9
+  --> $DIR/generic-elements.rs:66:9
    |
 LL |         simd_shuffle::<i32, _, i32>(0, 0, IDX8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x2` with element type `f32`
-  --> $DIR/generic-elements.rs:68:9
+  --> $DIR/generic-elements.rs:69:9
    |
 LL |         simd_shuffle::<_, _, f32x2>(x, x, IDX2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x4` with element type `f32`
-  --> $DIR/generic-elements.rs:70:9
+  --> $DIR/generic-elements.rs:71:9
    |
 LL |         simd_shuffle::<_, _, f32x4>(x, x, IDX4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x8` with element type `f32`
-  --> $DIR/generic-elements.rs:72:9
+  --> $DIR/generic-elements.rs:73:9
    |
 LL |         simd_shuffle::<_, _, f32x8>(x, x, IDX8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return type of length 2, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:75:9
+  --> $DIR/generic-elements.rs:76:9
    |
 LL |         simd_shuffle::<_, _, i32x8>(x, x, IDX2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return type of length 4, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:77:9
+  --> $DIR/generic-elements.rs:78:9
    |
 LL |         simd_shuffle::<_, _, i32x8>(x, x, IDX4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return type of length 8, found `i32x2` with length 2
-  --> $DIR/generic-elements.rs:79:9
+  --> $DIR/generic-elements.rs:80:9
    |
 LL |         simd_shuffle::<_, _, i32x2>(x, x, IDX8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:83:9
+  --> $DIR/generic-elements.rs:84:9
    |
 LL |         simd_shuffle_const_generic::<i32, i32, I2>(0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:86:9
+  --> $DIR/generic-elements.rs:87:9
    |
 LL |         simd_shuffle_const_generic::<i32, i32, I4>(0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:89:9
+  --> $DIR/generic-elements.rs:90:9
    |
 LL |         simd_shuffle_const_generic::<i32, i32, I8>(0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x2` with element type `f32`
-  --> $DIR/generic-elements.rs:92:9
+  --> $DIR/generic-elements.rs:93:9
    |
 LL |         simd_shuffle_const_generic::<_, f32x2, I2>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x4` with element type `f32`
-  --> $DIR/generic-elements.rs:94:9
+  --> $DIR/generic-elements.rs:95:9
    |
 LL |         simd_shuffle_const_generic::<_, f32x4, I4>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x8` with element type `f32`
-  --> $DIR/generic-elements.rs:96:9
+  --> $DIR/generic-elements.rs:97:9
    |
 LL |         simd_shuffle_const_generic::<_, f32x8, I8>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return type of length 2, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:99:9
+  --> $DIR/generic-elements.rs:100:9
    |
 LL |         simd_shuffle_const_generic::<_, i32x8, I2>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return type of length 4, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:101:9
+  --> $DIR/generic-elements.rs:102:9
    |
 LL |         simd_shuffle_const_generic::<_, i32x8, I4>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return type of length 8, found `i32x2` with length 2
-  --> $DIR/generic-elements.rs:103:9
+  --> $DIR/generic-elements.rs:104:9
    |
 LL |         simd_shuffle_const_generic::<_, i32x2, I8>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/simd/masked-load-store-build-fail.rs b/tests/ui/simd/masked-load-store-build-fail.rs
index 4b6cc17683c..c711b6dfd97 100644
--- a/tests/ui/simd/masked-load-store-build-fail.rs
+++ b/tests/ui/simd/masked-load-store-build-fail.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 #![feature(repr_simd, core_intrinsics)]
 
 use std::intrinsics::simd::{simd_masked_load, simd_masked_store};
diff --git a/tests/ui/simd/masked-load-store-build-fail.stderr b/tests/ui/simd/masked-load-store-build-fail.stderr
index 7f09841b597..b9158f46ea9 100644
--- a/tests/ui/simd/masked-load-store-build-fail.stderr
+++ b/tests/ui/simd/masked-load-store-build-fail.stderr
@@ -1,47 +1,47 @@
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected third argument with length 8 (same as input type `Simd<i8, 8>`), found `Simd<u8, 4>` with length 4
-  --> $DIR/masked-load-store-build-fail.rs:15:9
+  --> $DIR/masked-load-store-build-fail.rs:16:9
    |
 LL |         simd_masked_load(Simd::<i8, 8>([-1, 0, -1, -1, 0, 0, 0, 0]), arr.as_ptr(), default);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u8` of second argument `*const i8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*_ u8`
-  --> $DIR/masked-load-store-build-fail.rs:18:9
+  --> $DIR/masked-load-store-build-fail.rs:19:9
    |
 LL |         simd_masked_load(Simd::<i8, 4>([-1, 0, -1, -1]), arr.as_ptr() as *const i8, default);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*_ u32`
-  --> $DIR/masked-load-store-build-fail.rs:21:9
+  --> $DIR/masked-load-store-build-fail.rs:22:9
    |
 LL |         simd_masked_load(Simd::<i8, 4>([-1, 0, -1, -1]), arr.as_ptr(), Simd::<u32, 4>([9; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected mask element type to be an integer, found `f32`
-  --> $DIR/masked-load-store-build-fail.rs:24:9
+  --> $DIR/masked-load-store-build-fail.rs:25:9
    |
 LL |         simd_masked_load(Simd::<f32, 4>([1.0, 0.0, 1.0, 1.0]), arr.as_ptr(), default);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*mut u32`
-  --> $DIR/masked-load-store-build-fail.rs:27:9
+  --> $DIR/masked-load-store-build-fail.rs:28:9
    |
 LL |         simd_masked_store(Simd([-1i8; 4]), arr.as_ptr(), Simd([5u32; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u8` of second argument `*const u8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*mut u8`
-  --> $DIR/masked-load-store-build-fail.rs:30:9
+  --> $DIR/masked-load-store-build-fail.rs:31:9
    |
 LL |         simd_masked_store(Simd([-1i8; 4]), arr.as_ptr(), Simd([5u8; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected third argument with length 4 (same as input type `Simd<i8, 4>`), found `Simd<u8, 2>` with length 2
-  --> $DIR/masked-load-store-build-fail.rs:33:9
+  --> $DIR/masked-load-store-build-fail.rs:34:9
    |
 LL |         simd_masked_store(Simd([-1i8; 4]), arr.as_mut_ptr(), Simd([5u8; 2]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected mask element type to be an integer, found `f32`
-  --> $DIR/masked-load-store-build-fail.rs:36:9
+  --> $DIR/masked-load-store-build-fail.rs:37:9
    |
 LL |         simd_masked_store(Simd([1f32; 4]), arr.as_mut_ptr(), Simd([5u8; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/simd/monomorphize-shuffle-index.generic.stderr b/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
index b0742bc5ef8..c82adbf8d4c 100644
--- a/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
+++ b/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
@@ -1,5 +1,5 @@
 error: overly complex generic constant
-  --> $DIR/monomorphize-shuffle-index.rs:36:51
+  --> $DIR/monomorphize-shuffle-index.rs:37:51
    |
 LL |         return simd_shuffle_const_generic::<_, _, { &Self::I.0 }>(a, b);
    |                                                   ^^----------^^
diff --git a/tests/ui/simd/monomorphize-shuffle-index.rs b/tests/ui/simd/monomorphize-shuffle-index.rs
index 1490f8e2319..ba952cdb0dc 100644
--- a/tests/ui/simd/monomorphize-shuffle-index.rs
+++ b/tests/ui/simd/monomorphize-shuffle-index.rs
@@ -1,6 +1,7 @@
 //@ revisions: old generic generic_with_fn
 //@[old]run-pass
 //@[generic_with_fn]run-pass
+//@ ignore-backends: gcc
 #![feature(
     repr_simd,
     core_intrinsics,
diff --git a/tests/ui/simd/not-out-of-bounds.rs b/tests/ui/simd/not-out-of-bounds.rs
index 4bd2a69edbf..c80c90e3ab9 100644
--- a/tests/ui/simd/not-out-of-bounds.rs
+++ b/tests/ui/simd/not-out-of-bounds.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 #![allow(non_camel_case_types)]
 #![feature(repr_simd, core_intrinsics)]
 
diff --git a/tests/ui/simd/not-out-of-bounds.stderr b/tests/ui/simd/not-out-of-bounds.stderr
index 4b6bda93e45..734c21fbf41 100644
--- a/tests/ui/simd/not-out-of-bounds.stderr
+++ b/tests/ui/simd/not-out-of-bounds.stderr
@@ -1,5 +1,5 @@
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 4)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -10,7 +10,7 @@ LL |     test_shuffle_lanes!(2, u8x2, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 8)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -21,7 +21,7 @@ LL |     test_shuffle_lanes!(4, u8x4, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 16)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL |     test_shuffle_lanes!(8, u8x8, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 32)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -43,7 +43,7 @@ LL |     test_shuffle_lanes!(16, u8x16, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 64)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -54,7 +54,7 @@ LL |     test_shuffle_lanes!(32, u8x32, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 128)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -65,19 +65,19 @@ LL |     test_shuffle_lanes!(64, u8x64, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 4)
-  --> $DIR/not-out-of-bounds.rs:77:23
+  --> $DIR/not-out-of-bounds.rs:78:23
    |
 LL |         let _: u8x2 = simd_shuffle(v, v, I);
    |                       ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_insert` intrinsic: SIMD index #1 is out of bounds (limit 2)
-  --> $DIR/not-out-of-bounds.rs:83:9
+  --> $DIR/not-out-of-bounds.rs:84:9
    |
 LL |         simd_insert(v, 2, 0u8);
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_extract` intrinsic: SIMD index #1 is out of bounds (limit 2)
-  --> $DIR/not-out-of-bounds.rs:84:24
+  --> $DIR/not-out-of-bounds.rs:85:24
    |
 LL |         let _val: u8 = simd_extract(v, 2);
    |                        ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/structs-enums/unit-like-struct-drop-run.rs b/tests/ui/structs-enums/unit-like-struct-drop-run.rs
index 3d00871837c..5e3fc5931bd 100644
--- a/tests/ui/structs-enums/unit-like-struct-drop-run.rs
+++ b/tests/ui/structs-enums/unit-like-struct-drop-run.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Make sure the destructor is run for unit-like structs.
 
diff --git a/tests/ui/suggestions/issue-61963.rs b/tests/ui/suggestions/issue-61963.rs
index 77e4b21f5db..bf0680b9860 100644
--- a/tests/ui/suggestions/issue-61963.rs
+++ b/tests/ui/suggestions/issue-61963.rs
@@ -1,6 +1,7 @@
 //@ edition: 2015
 //@ proc-macro: issue-61963.rs
 //@ proc-macro: issue-61963-1.rs
+//@ ignore-backends: gcc
 #![deny(bare_trait_objects)]
 
 #[macro_use]
diff --git a/tests/ui/suggestions/issue-61963.stderr b/tests/ui/suggestions/issue-61963.stderr
index ffdeef12bb7..f9146a619ec 100644
--- a/tests/ui/suggestions/issue-61963.stderr
+++ b/tests/ui/suggestions/issue-61963.stderr
@@ -1,5 +1,5 @@
 error: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-61963.rs:23:14
+  --> $DIR/issue-61963.rs:24:14
    |
 LL |     bar: Box<Bar>,
    |              ^^^
@@ -7,7 +7,7 @@ LL |     bar: Box<Bar>,
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html>
 note: the lint level is defined here
-  --> $DIR/issue-61963.rs:4:9
+  --> $DIR/issue-61963.rs:5:9
    |
 LL | #![deny(bare_trait_objects)]
    |         ^^^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     bar: Box<dyn Bar>,
    |              +++
 
 error: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-61963.rs:19:1
+  --> $DIR/issue-61963.rs:20:1
    |
 LL | pub struct Foo {
    | ^^^
diff --git a/tests/ui/suggestions/suggest-ref-macro.rs b/tests/ui/suggestions/suggest-ref-macro.rs
index 2f31af33782..41a2acf9062 100644
--- a/tests/ui/suggestions/suggest-ref-macro.rs
+++ b/tests/ui/suggestions/suggest-ref-macro.rs
@@ -1,5 +1,6 @@
 // run-check
 //@ proc-macro: proc-macro-type-error.rs
+//@ ignore-backends: gcc
 
 extern crate proc_macro_type_error;
 
diff --git a/tests/ui/suggestions/suggest-ref-macro.stderr b/tests/ui/suggestions/suggest-ref-macro.stderr
index 08bc9e86a50..2a52c1e2445 100644
--- a/tests/ui/suggestions/suggest-ref-macro.stderr
+++ b/tests/ui/suggestions/suggest-ref-macro.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:8:1
+  --> $DIR/suggest-ref-macro.rs:9:1
    |
 LL | #[hello]
    | ^^^^^^^^
@@ -8,14 +8,14 @@ LL | #[hello]
    | arguments to this function are incorrect
    |
 note: function defined here
-  --> $DIR/suggest-ref-macro.rs:8:1
+  --> $DIR/suggest-ref-macro.rs:9:1
    |
 LL | #[hello]
    | ^^^^^^^^
    = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:15:11
+  --> $DIR/suggest-ref-macro.rs:16:11
    |
 LL |         x(123);
    |         - ^^^ expected `&mut i32`, found integer
@@ -26,7 +26,7 @@ LL |     bla!();
    |     ------ in this macro invocation
    |
 note: function defined here
-  --> $DIR/suggest-ref-macro.rs:11:4
+  --> $DIR/suggest-ref-macro.rs:12:4
    |
 LL | fn x(_: &mut i32) {}
    |    ^ -----------
@@ -37,7 +37,7 @@ LL |         x(&mut 123);
    |           ++++
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:26:10
+  --> $DIR/suggest-ref-macro.rs:27:10
    |
 LL |         x($v)
    |         - arguments to this function are incorrect
@@ -46,7 +46,7 @@ LL |     bla!(456);
    |          ^^^ expected `&mut i32`, found integer
    |
 note: function defined here
-  --> $DIR/suggest-ref-macro.rs:11:4
+  --> $DIR/suggest-ref-macro.rs:12:4
    |
 LL | fn x(_: &mut i32) {}
    |    ^ -----------
diff --git a/tests/ui/test-attrs/test-panic-while-printing.rs b/tests/ui/test-attrs/test-panic-while-printing.rs
index a50a15fbe5a..49e8d9c7afd 100644
--- a/tests/ui/test-attrs/test-panic-while-printing.rs
+++ b/tests/ui/test-attrs/test-panic-while-printing.rs
@@ -1,6 +1,7 @@
 //@ compile-flags:--test
 //@ run-pass
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 use std::fmt;
 use std::fmt::{Display, Formatter};
diff --git a/tests/ui/threads-sendsync/task-stderr.rs b/tests/ui/threads-sendsync/task-stderr.rs
index 3934084e02a..f54b5a5cc5f 100644
--- a/tests/ui/threads-sendsync/task-stderr.rs
+++ b/tests/ui/threads-sendsync/task-stderr.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 #![feature(internal_output_capture)]
 
diff --git a/tests/ui/threads-sendsync/unwind-resource.rs b/tests/ui/threads-sendsync/unwind-resource.rs
index ec27a1846fe..c5fbfc5bf5b 100644
--- a/tests/ui/threads-sendsync/unwind-resource.rs
+++ b/tests/ui/threads-sendsync/unwind-resource.rs
@@ -3,6 +3,7 @@
 
 #![allow(non_camel_case_types)]
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::sync::mpsc::{channel, Sender};
 use std::thread;
diff --git a/tests/ui/traits/clone-unwind-rc-cleanup.rs b/tests/ui/traits/clone-unwind-rc-cleanup.rs
index cd02050ea27..dab48a1b4c6 100644
--- a/tests/ui/traits/clone-unwind-rc-cleanup.rs
+++ b/tests/ui/traits/clone-unwind-rc-cleanup.rs
@@ -2,6 +2,7 @@
 
 //@ run-pass
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 #![allow(unused_variables)]
 #![allow(unused_imports)]
diff --git a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs
index c08030fc5c1..81c2d778b05 100644
--- a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs
+++ b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: derive-demo-issue-136343.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_demo_issue_136343;
diff --git a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr
index 0b9c1d9123a..d69eaae5335 100644
--- a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr
+++ b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/invalid-sugg-for-derive-macro-issue-136343.rs:6:10
+  --> $DIR/invalid-sugg-for-derive-macro-issue-136343.rs:7:10
    |
 LL | #[derive(Sample)]
    |          ^^^^^^