about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-11-28 10:12:01 +0100
committerNikita Popov <nikic@fedora.fritz.box>2024-11-29 19:11:34 +0100
commitfc9f727c7ce2e7ce3bedc0fe0ad390d20b72eb32 (patch)
tree6ce1768f4e68ea83b71f5251db3caf55e890beb3
parentd3ad00094313d6f777b4f44d707ccd457ce342ca (diff)
downloadrust-fc9f727c7ce2e7ce3bedc0fe0ad390d20b72eb32.tar.gz
rust-fc9f727c7ce2e7ce3bedc0fe0ad390d20b72eb32.zip
Fix tests that rely on LLVM IR verification
Pass -Z verify-llvm-ir to tests that rely on it, to make sure they
pass regardless of the value of verify-llvm-ir in config.toml.

Also remove the 109681.rs test, because it is a duplicat of
common-linkage-non-zero-init.rs.
-rw-r--r--tests/crashes/109681.rs9
-rw-r--r--tests/crashes/34127.rs2
-rw-r--r--tests/ui/linkage-attr/common-linkage-non-zero-init.rs1
3 files changed, 2 insertions, 10 deletions
diff --git a/tests/crashes/109681.rs b/tests/crashes/109681.rs
deleted file mode 100644
index 73ff1007094..00000000000
--- a/tests/crashes/109681.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ known-bug: #109681
-
-#![crate_type="lib"]
-#![feature(linkage)]
-
-#[linkage = "common"]
-pub static TEST3: bool = true;
-
-fn main() {}
diff --git a/tests/crashes/34127.rs b/tests/crashes/34127.rs
index 88a2cf30ec5..ea36b48ecba 100644
--- a/tests/crashes/34127.rs
+++ b/tests/crashes/34127.rs
@@ -1,4 +1,4 @@
-//@ compile-flags: -g -Copt-level=0
+//@ compile-flags: -g -Copt-level=0 -Z verify-llvm-ir
 //@ known-bug: #34127
 //@ only-x86_64
 
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 a1fdd5a014c..e5de08a7a28 100644
--- a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
+++ b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
@@ -2,6 +2,7 @@
 //@ failure-status: 101
 //@ known-bug: #109681
 //@ ignore-wasm32 this appears to SIGABRT on wasm, not fail cleanly
+//@ compile-flags: -Z verify-llvm-ir
 
 // This test verifies that we continue to hit the LLVM error for common linkage with non-zero
 // initializers, since it generates invalid LLVM IR.