diff --git a/tests/codegen/issues/issue-115385.rs b/tests/codegen/issues/issue-115385-llvm-jump-threading.rs similarity index 84% rename from tests/codegen/issues/issue-115385.rs rename to tests/codegen/issues/issue-115385-llvm-jump-threading.rs index 773b3507f2390..142e3596d9617 100644 --- a/tests/codegen/issues/issue-115385.rs +++ b/tests/codegen/issues/issue-115385-llvm-jump-threading.rs @@ -1,5 +1,4 @@ // compile-flags: -O -Ccodegen-units=1 -// only-x86_64-unknown-linux-gnu #![crate_type = "lib"] @@ -19,6 +18,7 @@ impl Copy for Boolean {} extern "C" { fn set_value(foo: *mut i64); + fn bar(); } pub fn foo(x: bool) { @@ -39,12 +39,8 @@ pub fn foo(x: bool) { let l2 = unsafe { *foo.as_mut_ptr() }; if l2 == 2 { // CHECK: call void @bar - bar(); + unsafe { + bar(); + } } } - -#[no_mangle] -#[inline(never)] -pub fn bar() { - println!("Working correctly!"); -}