about summary refs log tree commit diff
path: root/tests/codegen-llvm/cffi/c-variadic-naked.rs
blob: 5843628b6330a88dcb465829466f8f9dd1c331e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ needs-asm-support
//@ only-x86_64

// tests that `va_start` is not injected into naked functions

#![crate_type = "lib"]
#![feature(c_variadic)]
#![no_std]

#[unsafe(naked)]
pub unsafe extern "C" fn c_variadic(_: usize, _: ...) {
    // CHECK-NOT: va_start
    // CHECK-NOT: alloca
    core::arch::naked_asm!("ret")
}