We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c18da3c commit ddd8878Copy full SHA for ddd8878
tests/codegen/issues/issue-115385.rs renamed to tests/codegen/issues/issue-115385-llvm-jump-threading.rs
@@ -1,5 +1,4 @@
1
// compile-flags: -O -Ccodegen-units=1
2
-// only-x86_64-unknown-linux-gnu
3
4
#![crate_type = "lib"]
5
@@ -19,6 +18,7 @@ impl Copy for Boolean {}
19
18
20
extern "C" {
21
fn set_value(foo: *mut i64);
+ fn bar();
22
}
23
24
pub fn foo(x: bool) {
@@ -39,12 +39,8 @@ pub fn foo(x: bool) {
39
let l2 = unsafe { *foo.as_mut_ptr() };
40
if l2 == 2 {
41
// CHECK: call void @bar
42
- bar();
+ unsafe {
43
+ bar();
44
+ }
45
46
-
-#[no_mangle]
47
-#[inline(never)]
48
-pub fn bar() {
49
- println!("Working correctly!");
50
-}
0 commit comments