void test() {
  float a = (float)1;
  double b = (double)1;
  int c = (int)1.0;
  short d = (short)1.0;
  long e = (long)1.0;
  expectf(a, 1.0);
  expectd(b, 1.0);
  expecti(c, 1);
  expecti(d, 1);
  expecti(e, 1);
  expecti((int *)(ignore()), 1024);
  int n[10];
  *(int *)(n + c) = (int *)(ignore());
  expecti(n[c], 1024);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  0xeb8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movw   $0x1,-0x16(%rbp)
movq   $0x1,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe78(%rip),%xmm1
mov    $0x2,%al
call   1040 <expectf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe64(%rip),%xmm1
mov    $0x2,%al
call   1050 <expectd@plt>
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1060 <expecti@plt>
movswl -0x16(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1060 <expecti@plt>
mov    -0x20(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1060 <expecti@plt>
mov    $0x0,%al
call   1030 <ignore@plt>
movslq %eax,%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1060 <expecti@plt>
mov    $0x0,%al
call   1030 <ignore@plt>
cltq
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x50(%rbp,%rax,4)
movslq -0x14(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edi
mov    $0x400,%esi
mov    $0x0,%al
call   1060 <expecti@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
movsd  0xeb7(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1040 <expectf@plt>
movsd  0xea5(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1050 <expectd@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <expecti@plt>
xor    %eax,%eax
call   1030 <ignore@plt>
movslq %eax,%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1060 <expecti@plt>
xor    %eax,%eax
call   1030 <ignore@plt>
mov    %eax,%edi
mov    $0x400,%esi
xor    %eax,%eax
pop    %rcx
jmp    1060 <expecti@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca float
%2 = alloca double
%3 = alloca i32
%4 = alloca i16
%5 = alloca i64
%6 = alloca [10 x i32]
store float 1.000000e+00, float* %1
store double 1.000000e+00, double* %2
store i32 1, i32* %3
store i16 1, i16* %4
store i64 1, i64* %5
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @expectf to i32 (double, double, ...)*)(double %8, double 1.000000e+00)
%10 = load double, double* %2
%11 = call i32 (double, double, ...) bitcast (i32 (...)* @expectd to i32 (double, double, ...)*)(double %10, double 1.000000e+00)
%12 = load i32, i32* %3
%13 = call i32 (i32, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32, i32, ...)*)(i32 %12, i32 1)
%14 = load i16, i16* %4
%15 = sext i16 %14 to i32
%16 = call i32 (i32, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32, i32, ...)*)(i32 %15, i32 1)
%17 = load i64, i64* %5
%18 = call i32 (i64, i32, ...) bitcast (i32 (...)* @expecti to i32 (i64, i32, ...)*)(i64 %17, i32 1)
%19 = call i32 (...) @ignore()
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32*, i32, ...)*)(i32* %21, i32 1024)
%23 = call i32 (...) @ignore()
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
%26 = ptrtoint i32* %25 to i32
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %27, i64 %29
store i32 %26, i32* %30
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = call i32 (i32, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32, i32, ...)*)(i32 %34, i32 1024)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (double, double, ...) bitcast (i32 (...)* @expectf to i32 (double, double, ...)*)(double 1.000000e+00, double 1.000000e+00)
%2 = tail call i32 (double, double, ...) bitcast (i32 (...)* @expectd to i32 (double, double, ...)*)(double 1.000000e+00, double 1.000000e+00)
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32, i32, ...)*)(i32 1, i32 1)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32, i32, ...)*)(i32 1, i32 1)
%5 = tail call i32 (i64, i32, ...) bitcast (i32 (...)* @expecti to i32 (i64, i32, ...)*)(i64 1, i32 1)
%6 = tail call i32 (...) @ignore()
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32*, i32, ...)*)(i32* %8, i32 1024)
%10 = tail call i32 (...) @ignore()
%11 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @expecti to i32 (i32, i32, ...)*)(i32 %10, i32 1024)
ret void
}