[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / misaligned-param.c
blob57b8e5ace2e84f5f85d49361ca482b9296860997
1 // RUN: %clang_cc1 %s -std=c89 -triple i386-apple-darwin -emit-llvm -o - | FileCheck %s
2 // Misaligned parameter must be memcpy'd to correctly aligned temporary.
4 struct s { int x; long double y; };
5 int bar(struct s *, struct s *);
6 long double foo(struct s x, int i, struct s y) {
7 // CHECK: foo
8 // CHECK: %x = alloca %struct.s, align 16
9 // CHECK: %y = alloca %struct.s, align 16
10 // CHECK: memcpy
11 // CHECK: memcpy
12 // CHECK: bar
13 return bar(&x, &y);