blob: 57c9e47a4992afce68fb25be69bd34efcf433eb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//! Ensure that `#[optimize(none)]` functions are never inlined
//@ compile-flags: -Copt-level=3
#![feature(optimize_attribute)]
#[optimize(none)]
pub fn foo() {
let _x = 123;
}
// CHECK-LABEL: define{{.*}}void @bar
// CHECK: start:
// CHECK: {{.*}}call {{.*}}void
// CHECK: ret void
#[no_mangle]
pub fn bar() {
foo();
}
fn main() {}
|