2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr77664.c
blobbcf7b885608e0a71cae4fb4dd7e5b4e6adf2c8a0
1 /* PR tree-optimization/77664 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 #include "tree-ssa/pr77664.c"
7 int cnt;
9 __attribute__((noinline, noclone)) void
10 foo (void)
12 cnt++;
15 int
16 main ()
18 fn1 (65534U, 65535U, 7); if (cnt != 1) __builtin_abort ();
19 fn1 (65534U, 65535U, 0); if (cnt != 1) __builtin_abort ();
20 fn1 (65535U, 65535U, 1); if (cnt != 1) __builtin_abort ();
21 fn1 (0, 65535U, 1); if (cnt != 2) __builtin_abort ();
22 fn1 (-1, 65535U, 1); if (cnt != 2) __builtin_abort ();
23 fn1 (0, 0, 1); if (cnt != 2) __builtin_abort ();
24 fn2 (65534U, 65535U, 7); if (cnt != 3) __builtin_abort ();
25 fn2 (65534U, 65535U, 0); if (cnt != 3) __builtin_abort ();
26 fn2 (65535U, 65535U, 0); if (cnt != 4) __builtin_abort ();
27 fn2 (0, 65535U, 0); if (cnt != 4) __builtin_abort ();
28 fn2 (-1, 65535U, 0); if (cnt != 5) __builtin_abort ();
29 fn2 (0, 0, 0); if (cnt != 6) __builtin_abort ();
30 fn3 (-1, 65534U); if (cnt != 7) __builtin_abort ();
31 fn3 (0, 65534U); if (cnt != 7) __builtin_abort ();
32 fn3 (65534U, 65534U); if (cnt != 7) __builtin_abort ();
33 fn3 (65535U, 65534U); if (cnt != 8) __builtin_abort ();
34 fn3 (0, 0); if (cnt != 8) __builtin_abort ();
35 fn3 (1, 0); if (cnt != 9) __builtin_abort ();
36 fn4 (-1, 65534U); if (cnt != 9) __builtin_abort ();
37 fn4 (0, 65534U); if (cnt != 10) __builtin_abort ();
38 fn4 (65534U, 65534U); if (cnt != 11) __builtin_abort ();
39 fn4 (65535U, 65534U); if (cnt != 11) __builtin_abort ();
40 fn4 (0, 0); if (cnt != 12) __builtin_abort ();
41 fn4 (1, 0); if (cnt != 12) __builtin_abort ();
42 fn5 (-1, 65534U); if (cnt != 13) __builtin_abort ();
43 fn5 (0, 65534U); if (cnt != 13) __builtin_abort ();
44 fn5 (65534U, 65534U); if (cnt != 13) __builtin_abort ();
45 fn5 (65535U, 65534U); if (cnt != 14) __builtin_abort ();
46 fn5 (0, 0); if (cnt != 14) __builtin_abort ();
47 fn5 (1, 0); if (cnt != 15) __builtin_abort ();
48 fn6 (-1, 65534U); if (cnt != 15) __builtin_abort ();
49 fn6 (0, 65534U); if (cnt != 16) __builtin_abort ();
50 fn6 (65534U, 65534U); if (cnt != 17) __builtin_abort ();
51 fn6 (65535U, 65534U); if (cnt != 17) __builtin_abort ();
52 fn6 (0, 0); if (cnt != 18) __builtin_abort ();
53 fn6 (1, 0); if (cnt != 18) __builtin_abort ();
54 return 0;