summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/for-3.C
blob: fcf5a2c1b2372ae8fc3e6df9dbb8f2955161c566 (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
// { dg-do compile }

int bar ();

void foo()
{
  int i;

  #pragma omp for schedule		// { dg-error "expected" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule static	// { dg-error "expected" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (		// { dg-error "invalid schedule kind" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static	// { dg-error "expected" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static )
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( foo )	// { dg-error "invalid schedule kind" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static 1	// { dg-error "expected" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static 1 ) nowait	// { dg-error "expected" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static, 1 ) nowait
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static, 1, 1 ) nowait  // { dg-error "expected" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static, 1 + 1 ) nowait
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule ( static, 1.0 )	// { dg-error "integral" }
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (dynamic)
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (dynamic, bar ())
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (guided)
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (guided, bar ())
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (runtime)
  for (i = 0; i < 10; ++i) ;

  #pragma omp for schedule (runtime, bar ())	// { dg-error "does not take" }
  for (i = 0; i < 10; ++i) ;
}