]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/compilable/cdcmp.d
Merge remote-tracking branch 'origin/master' into devel/c++-contracts
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / cdcmp.d
CommitLineData
5fee5ec3
IB
1// PERMUTE_ARGS:
2// REQUIRED_ARGS: -O
3// POST_SCRIPT: compilable/extra-files/objdump-postscript.sh
4// only testing on SYSV-ABI, but backend code is identical across platforms
0fb57034 5// DISABLED: win32 win64 osx linux32 freebsd32 freebsd64 openbsd32 openbsd64
5fee5ec3
IB
6
7bool test_ltz(ubyte x) { return x < 0; }
8bool test_lez(ubyte x) { return x <= 0; }
9bool test_eqz(ubyte x) { return x == 0; }
10bool test_nez(ubyte x) { return x != 0; }
11bool test_gez(ubyte x) { return x >= 0; }
12bool test_gtz(ubyte x) { return x > 0; }
13
14bool test_ltz(byte x) { return x < 0; }
15bool test_lez(byte x) { return x <= 0; }
16bool test_eqz(byte x) { return x == 0; }
17bool test_nez(byte x) { return x != 0; }
18bool test_gez(byte x) { return x >= 0; }
19bool test_gtz(byte x) { return x > 0; }
20
21bool test_ltz(ushort x) { return x < 0; }
22bool test_lez(ushort x) { return x <= 0; }
23bool test_eqz(ushort x) { return x == 0; }
24bool test_nez(ushort x) { return x != 0; }
25bool test_gez(ushort x) { return x >= 0; }
26bool test_gtz(ushort x) { return x > 0; }
27
28bool test_ltz(short x) { return x < 0; }
29bool test_lez(short x) { return x <= 0; }
30bool test_eqz(short x) { return x == 0; }
31bool test_nez(short x) { return x != 0; }
32bool test_gez(short x) { return x >= 0; }
33bool test_gtz(short x) { return x > 0; }
34
35bool test_ltz(uint x) { return x < 0; }
36bool test_lez(uint x) { return x <= 0; }
37bool test_eqz(uint x) { return x == 0; }
38bool test_nez(uint x) { return x != 0; }
39bool test_gez(uint x) { return x >= 0; }
40bool test_gtz(uint x) { return x > 0; }
41
42bool test_ltz(int x) { return x < 0; }
43bool test_lez(int x) { return x <= 0; }
44bool test_eqz(int x) { return x == 0; }
45bool test_nez(int x) { return x != 0; }
46bool test_gez(int x) { return x >= 0; }
47bool test_gtz(int x) { return x > 0; }
48
49bool test_ltz(ulong x) { return x < 0; }
50bool test_lez(ulong x) { return x <= 0; }
51bool test_eqz(ulong x) { return x == 0; }
52bool test_nez(ulong x) { return x != 0; }
53bool test_gez(ulong x) { return x >= 0; }
54bool test_gtz(ulong x) { return x > 0; }
55
56bool test_ltz(long x) { return x < 0; }
57bool test_lez(long x) { return x <= 0; }
58bool test_eqz(long x) { return x == 0; }
59bool test_nez(long x) { return x != 0; }
60bool test_gez(long x) { return x >= 0; }
61bool test_gtz(long x) { return x > 0; }
62
5fee5ec3
IB
63/* ----------------------------------- */
64
65bool test_lt(ubyte x, ubyte y) { return x < y; }
66bool test_le(ubyte x, ubyte y) { return x <= y; }
67bool test_eq(ubyte x, ubyte y) { return x == y; }
68bool test_ne(ubyte x, ubyte y) { return x != y; }
69bool test_ge(ubyte x, ubyte y) { return x >= y; }
70bool test_gt(ubyte x, ubyte y) { return x > y; }
71
72bool test_lt(byte x, byte y) { return x < y; }
73bool test_le(byte x, byte y) { return x <= y; }
74bool test_eq(byte x, byte y) { return x == y; }
75bool test_ne(byte x, byte y) { return x != y; }
76bool test_ge(byte x, byte y) { return x >= y; }
77bool test_gt(byte x, byte y) { return x > y; }
78
79bool test_lt(ushort x, ushort y) { return x < y; }
80bool test_le(ushort x, ushort y) { return x <= y; }
81bool test_eq(ushort x, ushort y) { return x == y; }
82bool test_ne(ushort x, ushort y) { return x != y; }
83bool test_ge(ushort x, ushort y) { return x >= y; }
84bool test_gt(ushort x, ushort y) { return x > y; }
85
86bool test_lt(short x, short y) { return x < y; }
87bool test_le(short x, short y) { return x <= y; }
88bool test_eq(short x, short y) { return x == y; }
89bool test_ne(short x, short y) { return x != y; }
90bool test_ge(short x, short y) { return x >= y; }
91bool test_gt(short x, short y) { return x > y; }
92
93bool test_lt(uint x, uint y) { return x < y; }
94bool test_le(uint x, uint y) { return x <= y; }
95bool test_eq(uint x, uint y) { return x == y; }
96bool test_ne(uint x, uint y) { return x != y; }
97bool test_ge(uint x, uint y) { return x >= y; }
98bool test_gt(uint x, uint y) { return x > y; }
99
100bool test_lt(int x, int y) { return x < y; }
101bool test_le(int x, int y) { return x <= y; }
102bool test_eq(int x, int y) { return x == y; }
103bool test_ne(int x, int y) { return x != y; }
104bool test_ge(int x, int y) { return x >= y; }
105bool test_gt(int x, int y) { return x > y; }
106
107bool test_lt(ulong x, ulong y) { return x < y; }
108bool test_le(ulong x, ulong y) { return x <= y; }
109bool test_eq(ulong x, ulong y) { return x == y; }
110bool test_ne(ulong x, ulong y) { return x != y; }
111bool test_ge(ulong x, ulong y) { return x >= y; }
112bool test_gt(ulong x, ulong y) { return x > y; }
113
114bool test_lt(long x, long y) { return x < y; }
115bool test_le(long x, long y) { return x <= y; }
116bool test_eq(long x, long y) { return x == y; }
117bool test_ne(long x, long y) { return x != y; }
118bool test_ge(long x, long y) { return x >= y; }
119bool test_gt(long x, long y) { return x > y; }
120
121bool test_lt(float x, float y) { return x < y; }
122bool test_le(float x, float y) { return x <= y; }
123bool test_eq(float x, float y) { return x == y; }
124bool test_ne(float x, float y) { return x != y; }
125bool test_ge(float x, float y) { return x >= y; }
126bool test_gt(float x, float y) { return x > y; }
127
128bool test_lt(double x, double y) { return x < y; }
129bool test_le(double x, double y) { return x <= y; }
130bool test_eq(double x, double y) { return x == y; }
131bool test_ne(double x, double y) { return x != y; }
132bool test_ge(double x, double y) { return x >= y; }
133bool test_gt(double x, double y) { return x > y; }