summaryrefslogtreecommitdiff
path: root/test/FrontendC/misaligned-param.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
commitd39c594d39df7f283c2fb8a704a3f31c501180d9 (patch)
tree36453626c792cccd91f783a38a169d610a6b9db9 /test/FrontendC/misaligned-param.c
parent6144c1de6a7674dad94290650e4e14f24d42e421 (diff)
Notes
Diffstat (limited to 'test/FrontendC/misaligned-param.c')
-rw-r--r--test/FrontendC/misaligned-param.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/FrontendC/misaligned-param.c b/test/FrontendC/misaligned-param.c
new file mode 100644
index 0000000000000..b4fcfe312f5af
--- /dev/null
+++ b/test/FrontendC/misaligned-param.c
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc %s -m32 -S -o - | FileCheck %s
+// Misaligned parameter must be memcpy'd to correctly aligned temporary.
+// XFAIL: *
+// XTARGET: i386-apple-darwin,i686-apple-darwin,x86_64-apple-darwin
+
+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);
+}