| 1 |
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s |
| 2 |
|
| 3 |
#define FASTCALL __attribute__((regparm(2))) |
| 4 |
|
| 5 |
typedef struct { |
| 6 |
int aaa; |
| 7 |
double bbbb; |
| 8 |
int ccc[200]; |
| 9 |
} foo; |
| 10 |
|
| 11 |
typedef void (*FType)(int, int) __attribute ((regparm (3), stdcall)); |
| 12 |
FType bar; |
| 13 |
|
| 14 |
extern void FASTCALL reduced(char b, double c, foo* d, double e, int f); |
| 15 |
|
| 16 |
// PR7025 |
| 17 |
void FASTCALL f1(int i, int j, int k); |
| 18 |
// CHECK-LABEL: define{{.*}} void @f1(i32 inreg noundef %i, i32 inreg noundef %j, i32 noundef %k) |
| 19 |
void f1(int i, int j, int k) { } |
| 20 |
|
| 21 |
int |
| 22 |
main(void) { |
| 23 |
// CHECK: call void @reduced(i8 inreg noundef signext 0, {{.*}} ptr inreg noundef null |
| 24 |
reduced(0, 0.0, 0, 0.0, 0); |
| 25 |
// CHECK: call x86_stdcallcc void {{.*}}(i32 inreg noundef 1, i32 inreg noundef 2) |
| 26 |
bar(1,2); |
| 27 |
} |