]> git.lizzy.rs Git - rust.git/blob - tests/codegen/lto-removes-invokes.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / lto-removes-invokes.rs
1 // compile-flags: -C lto -C panic=abort -O
2 // no-prefer-dynamic
3
4 fn main() {
5     foo();
6 }
7
8 #[no_mangle]
9 #[inline(never)]
10 fn foo() {
11     let _a = Box::new(3);
12     bar();
13 // CHECK-LABEL: define dso_local void @foo
14 // CHECK: call void @bar
15 }
16
17 #[inline(never)]
18 #[no_mangle]
19 fn bar() {
20     println!("hello!");
21 }