Skip to content

Commit ddd8878

Browse files
author
David Koloski
committed
Address feedback
1 parent c18da3c commit ddd8878

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tests/codegen/issues/issue-115385.rs renamed to tests/codegen/issues/issue-115385-llvm-jump-threading.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// compile-flags: -O -Ccodegen-units=1
2-
// only-x86_64-unknown-linux-gnu
32

43
#![crate_type = "lib"]
54

@@ -19,6 +18,7 @@ impl Copy for Boolean {}
1918

2019
extern "C" {
2120
fn set_value(foo: *mut i64);
21+
fn bar();
2222
}
2323

2424
pub fn foo(x: bool) {
@@ -39,12 +39,8 @@ pub fn foo(x: bool) {
3939
let l2 = unsafe { *foo.as_mut_ptr() };
4040
if l2 == 2 {
4141
// CHECK: call void @bar
42-
bar();
42+
unsafe {
43+
bar();
44+
}
4345
}
4446
}
45-
46-
#[no_mangle]
47-
#[inline(never)]
48-
pub fn bar() {
49-
println!("Working correctly!");
50-
}

0 commit comments

Comments
 (0)