* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / pr35356-1.c
blobce85178fa68a254ebea552e16952dd92cbff42eb
1 /* { dg-options "-O2 -fgraphite-identity -fdump-tree-graphite-all" } */
3 int a[100];
5 int
6 foo (int bar, int n, int k)
8 int i;
10 for (i = 0; i < n; i++)
11 if (i == k)
12 a[i] = bar;
14 for (i = 0; i < n; i++)
15 if (i == k)
16 a[i] = bar;
18 return a[bar];
21 /* There should be no loops generated for this testcase, instead we
22 should generate the following:
24 | if (k >= 0 && k < n)
25 | a[k] = bar;
27 Check that this text is produced:
29 AST generated by isl:
30 if (n >= k + 1 && k >= 0) {
31 S_6(k);
32 S_11(k);
37 /* { dg-final { scan-tree-dump "if \\\(P_8 >= P_11 \\\+ 1 && P_11 >= 0\\\) \\\{" "graphite" } } */