gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c
raw| 1 | static int __attribute__((noinline)) |
| 2 | foo (int k, int n1, int n2, int n3) |
| 3 | { |
| 4 | int j, res = 0; |
| 5 | for (j = 0; j < k; j++) |
| 6 | { |
| 7 | int i; |
| 8 | for (i = 0; i < n1; i++) |
| 9 | res += i; |
| 10 | for (i = 0; i < n2; i++) |
| 11 | res += i; |
| 12 | for (i = 0; i < n3; i++) |
| 13 | res += i; |
| 14 | } |
| 15 | |
| 16 | return res; |
| 17 | } |
| 18 | |
| 19 | extern void abort (); |
| 20 | |
| 21 | int |
| 22 | main (void) |
| 23 | { |
| 24 | int res = foo (4, 50, 50, 50); |
| 25 | if (res != 14700) |
| 26 | abort (); |
| 27 | |
| 28 | return 0; |
| 29 | } |