blob: 1fbed300d8047de7e04ae8f3a2b97cd35f41ce82 [file] [log] [blame]
Charles Davis16c4f3c2010-02-05 18:13:10 +00001// RUN: %clang_cc1 -emit-llvm < %s | grep 'fastcallcc' | count 6
2// RUN: %clang_cc1 -emit-llvm < %s | grep 'stdcallcc' | count 6
Anton Korobeynikovf1c9c092008-11-11 20:21:14 +00003
4void __attribute__((fastcall)) f1(void);
5void __attribute__((stdcall)) f2(void);
6void __attribute__((fastcall)) f3(void) {
7 f1();
8}
9void __attribute__((stdcall)) f4(void) {
10 f2();
11}
12
Charles Davis16c4f3c2010-02-05 18:13:10 +000013// PR5280
14void (__attribute__((fastcall)) *pf1)(void) = f1;
15void (__attribute__((stdcall)) *pf2)(void) = f2;
16void (__attribute__((fastcall)) *pf3)(void) = f3;
17void (__attribute__((stdcall)) *pf4)(void) = f4;
18
Anton Korobeynikovf1c9c092008-11-11 20:21:14 +000019int main(void) {
20 f3(); f4();
Charles Davis16c4f3c2010-02-05 18:13:10 +000021 pf1(); pf2(); pf3(); pf4();
Anton Korobeynikovf1c9c092008-11-11 20:21:14 +000022 return 0;
23}
24