aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC/misaligned-param.c
blob: 8118ce49ccd32f94a79be8b22a4b4dca9befceb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %llvmgcc %s -m32 -S -o - | FileCheck %s
// Misaligned parameter must be memcpy'd to correctly aligned temporary.
// XFAIL: *
// XTARGET: i386,i686,x86_64

struct s { int x; long double y; };
long double foo(struct s x, int i, struct s y) {
// CHECK: foo
// CHECK: %x_addr = alloca %struct.s, align 16
// CHECK: %y_addr = alloca %struct.s, align 16
// CHECK: memcpy
// CHECK: memcpy
// CHECK: bar
  return bar(&x, &y);
}