tree-optimization/111445 - simple_iv simplification fault
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr111445.c
blob320e0b906754b0a784b08c0d653c16cd0ecb2fc8
1 /* { dg-do run } */
3 extern void abort (void);
4 short a, b;
5 unsigned char c = 255;
6 unsigned cnt;
7 void __attribute__((noipa))
8 check (int x)
10 if (x != 0)
11 abort ();
12 cnt++;
14 int main()
16 int d;
17 unsigned char e;
18 d = 0;
19 for (; a >= 0; a--) {
20 int *f = &d;
21 *f = c;
23 e = 0;
24 for (; (unsigned char)(d - 255) + e <= 1; e++)
25 check (b);
26 if (cnt != 2)
27 abort ();
28 return 0;