PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / long-long-compare-1.c
blobe05fcead21fde7072fe86dd498ce4270c3be6ea5
1 /* Problem noticed on SH for DImode comparison with constants.
2 /* { dg-do run } */
3 /* { dg-options "-O0" } */
5 extern void abort(void);
6 extern void exit(int);
8 int test2(long long n)
10 if (n < 2)
11 return 1;
12 return 0;
15 int test1(long long n)
17 if (n < 1)
18 return 1;
19 return 0;
22 int test0(long long n)
24 if (n < 0)
25 return 1;
26 return 0;
29 int test1n(long long n)
31 if (n < -1LL)
32 return 1;
33 return 0;
36 int test2n(long long n)
38 if (n < -2LL)
39 return 1;
40 return 0;
43 int main()
45 if (test2n (-1LL))
46 abort ();
48 if (test2n (-2LL))
49 abort ();
51 if (test2n (0LL))
52 abort ();
54 if (test2n (1LL))
55 abort ();
57 if (test2n (2LL))
58 abort ();
60 if (test1n (-1LL))
61 abort ();
63 if (!test1n (-2LL))
64 abort ();
66 if (test1n (0LL))
67 abort ();
69 if (test1n (1LL))
70 abort ();
72 if (test1n (2LL))
73 abort ();
75 if (!test0 (-1LL))
76 abort ();
78 if (!test0 (-2LL))
79 abort ();
81 if (test0 (0LL))
82 abort ();
84 if (test0 (1LL))
85 abort ();
87 if (test0 (2LL))
88 abort ();
90 if (!test2 (-1LL))
91 abort ();
93 if (!test2 (-2LL))
94 abort ();
96 if (!test2 (0LL))
97 abort ();
99 if (!test2 (1LL))
100 abort ();
102 if (test2 (2LL))
103 abort ();
105 if (!test1 (-1LL))
106 abort ();
108 if (!test1 (-2LL))
109 abort ();
111 if (!test1 (0LL))
112 abort ();
114 if (test1 (1LL))
115 abort ();
117 if (test1 (2LL))
118 abort ();
120 exit (0);