]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/callconv.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / callconv.d
1 // PERMUTE_ARGS:
2
3 import core.stdc.stdarg;
4
5 struct ABC
6 {
7 int x[4];
8 }
9
10 ABC abc;
11
12 int x,y,z;
13
14 extern (Pascal):
15 ABC test1(int xx, int yy, int zz)
16 {
17 x = xx;
18 y = yy;
19 z = zz;
20 return abc;
21 }
22
23 extern (Pascal):
24 ABC test1v(int xx, int yy, int zz, ...)
25 {
26 x = xx;
27 y = yy;
28 z = zz;
29 return abc;
30 }
31
32 extern (C):
33 ABC test2v(int xx, int yy, int zz, ...)
34 {
35 x = xx;
36 y = yy;
37 z = zz;
38 return abc;
39 }
40
41 extern (C++):
42 ABC test3(int xx, int yy, int zz)
43 {
44 x = xx;
45 y = yy;
46 z = zz;
47 return abc;
48 }
49
50 ABC test3v(int xx, int yy, int zz, ...)
51 {
52 x = xx;
53 y = yy;
54 z = zz;
55 return abc;
56 }
57
58 extern (D):
59 ABC test4(int xx, int yy, int zz)
60 {
61 x = xx;
62 y = yy;
63 z = zz;
64 return abc;
65 }
66
67 ABC test4v(int xx, int yy, int zz, ...)
68 {
69 x = xx;
70 y = yy;
71 z = zz;
72 return abc;
73 }
74
75