summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/for-18.C
blob: 0a5052674939256f2e91ffd718ca4204c83ef6e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// { dg-do compile }
extern int bar (int);

void
foo (void)
{
  int j, k = 1, l = 30, m = 4;
  long int o = 4;
  long long int p = 0;
#pragma omp for
  for (j = k; j <= l; j += m - 1)
    ;
#pragma omp for
  for (j = k; j <= l; j += (m - 1))
    ;
#pragma omp for
  for (j = k; j <= l; j += bar (m - 1))
    ;
#pragma omp for
  for (j = k; j <= l; j = j + m - 1)
    ;
#pragma omp for
  for (j = k; j <= l; j = j + (m - 1))
    ;
#pragma omp for
  for (j = k; j <= l; j = j + bar (m - 1))
    ;
#pragma omp for
  for (j = ({ int n; n = k; n; }); j <= l; j++)
    ;
#pragma omp for
  for (j = k; j <= ({ int n; n = l; n; }); j++)
    ;
#pragma omp for
  for (j = k; j <= l; j += ({ int n; n = 1; n; }))
    ;
#pragma omp for
  for (j = k; j <= l; j += m + 1)
    ;
#pragma omp for
  for (j = k; j <= l; j += o)
    ;
#pragma omp for
  for (j = k; j <= l; j = j + o)
    ;
#pragma omp for
  for (j = k; j <= l; j = o + 1 + j)
    ;
#pragma omp for
  for (j = k; j <= l; j = o + m + j)
    ;
#pragma omp for
  for (j = k; j <= l; j += o + p)
    ;
#pragma omp for
  for (j = k; j <= l; j = j + o + p)
    ;
#pragma omp for
  for (j = l; j >= k; j -= o)
    ;
#pragma omp for
  for (j = l; j >= k; j -= p)
    ;
#pragma omp for
  for (j = l; j >= k; j -= o + p)
    ;
}