1 // Checks that naked functions are never inlined.
2 // compile-flags: -O -Zmir-opt-level=3
6 #![feature(naked_functions)]
13 pub unsafe extern "C" fn f() {
14 // Check that f has naked and noinline attributes.
16 // CHECK: define void @f() unnamed_addr [[ATTR:#[0-9]+]]
18 // CHECK-NEXT: call void asm
19 asm!("", options(noreturn));
24 // Check that call to f is not inlined.
26 // CHECK-LABEL: define void @g()
28 // CHECK-NEXT: call void @f()
32 // CHECK: attributes [[ATTR]] = { naked noinline{{.*}} }