]>
git.proxmox.com Git - rustc.git/blob - src/test/codegen/naked-noinline.rs
1 // Checks that naked functions are never inlined.
2 // compile-flags: -O -Zmir-opt-level=3
6 #![feature(naked_functions)]
11 pub unsafe extern "C" fn f() {
12 // Check that f has naked and noinline attributes.
14 // CHECK: define void @f() unnamed_addr [[ATTR:#[0-9]+]]
16 // CHECK-NEXT: call void asm
17 asm
!("", options(noreturn
));
22 // Check that call to f is not inlined.
24 // CHECK-LABEL: define void @g()
26 // CHECK-NEXT: call void @f()
30 // CHECK: attributes [[ATTR]] = { naked noinline{{.*}} }