builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr69097-2.c
blobbf7ac0eb0795314b4e766e6774b58317a96878f0
1 /* PR tree-optimization/69097 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "-y" 17 "optimized" } } */
6 int
7 f1 (int x, int y)
9 if (x == -__INT_MAX__)
10 __builtin_unreachable ();
11 return x % -y;
14 int
15 f2 (int x, int y)
17 if (x >= -__INT_MAX__ + 1)
18 __builtin_unreachable ();
19 return x % -y;
22 int
23 f3 (int x, int y)
25 if (y == -2)
26 __builtin_unreachable ();
27 return x % -y;
30 int
31 f4 (int x, int y)
33 if (y < -1)
34 __builtin_unreachable ();
35 return x % -y;
38 int
39 f5 (int x, int y)
41 if (y >= 0)
42 __builtin_unreachable ();
43 return x % -y;
46 int
47 f6 (int x, int y)
49 if (y < -1 || y > 24)
50 __builtin_unreachable ();
51 return x % -y;
54 int
55 f7 (int x, int y)
57 if (y <= -17 || y >= 0)
58 __builtin_unreachable ();
59 return x % -y;
62 int
63 f8 (int x, int y)
65 if (y >= -13 && y <= -2)
66 __builtin_unreachable ();
67 return x % -y;
70 int
71 f9 (int x, int y)
73 return x % -y;
76 int
77 f10 (int x, int y)
79 if (x != -__INT_MAX__)
80 return x % -y;
81 return 34;
84 int
85 f11 (int x, int y)
87 if (x < -__INT_MAX__ + 2)
88 return x % -y;
89 return 34;
92 int
93 f12 (int x, int y)
95 if (y != -2)
96 return x % -y;
97 return 34;
101 f13 (int x, int y)
103 if (y >= -1)
104 return x % -y;
105 return 34;
109 f14 (int x, int y)
111 if (y < 0)
112 return x % -y;
113 return 34;
117 f15 (int x, int y)
119 if (y >= -1 && y <= 24)
120 return x % -y;
121 return 34;
125 f16 (int x, int y)
127 if (y > -17 && y < 0)
128 return x % -y;
129 return 34;
133 f17 (int x, int y)
135 if (y < -13 || y > -4)
136 return x % -y;
137 return 34;