PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / pr35356-1.c
blob2ba0c1b0f5ec966fe06fff48dc1e87ed67b2caf4
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 return a[bar];
17 /* There should be no loops generated for this testcase, instead we
18 should generate the following:
20 | if (k >= 0 && k < n)
21 | a[k] = bar;
25 /* { dg-final { scan-tree-dump-times "loop_1" 0 "graphite" } } */
26 /* { dg-final { cleanup-tree-dump "graphite" } } */