PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr78675.c
blob7cef3425f7644306ebe3929be8d4fdd15934d63e
1 /* PR tree-optimization/78675 */
3 long int a;
5 __attribute__((noinline, noclone)) long int
6 foo (long int x)
8 long int b;
9 while (a < 1)
11 b = a && x;
12 ++a;
14 return b;
17 int
18 main ()
20 if (foo (0) != 0)
21 __builtin_abort ();
22 a = 0;
23 if (foo (1) != 0)
24 __builtin_abort ();
25 a = 0;
26 if (foo (25) != 0)
27 __builtin_abort ();
28 a = -64;
29 if (foo (0) != 0)
30 __builtin_abort ();
31 a = -64;
32 if (foo (1) != 0)
33 __builtin_abort ();
34 a = -64;
35 if (foo (25) != 0)
36 __builtin_abort ();
37 return 0;