File: parallel_copyin_messages.cpp

package info (click to toggle)
llvm-toolchain-3.5 1%3A3.5-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 282,028 kB
  • ctags: 310,872
  • sloc: cpp: 1,883,926; ansic: 310,731; objc: 86,612; python: 79,565; asm: 65,844; sh: 9,829; makefile: 6,057; perl: 5,589; ml: 5,254; pascal: 3,285; lisp: 1,640; xml: 686; cs: 239; csh: 117
file content (67 lines) | stat: -rw-r--r-- 2,209 bytes parent folder | download | duplicates (2)
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
// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s

void foo() {
}

bool foobool(int argc) {
  return argc;
}

struct S1; // expected-note {{declared here}}
class S2 {
  mutable int a;
public:
  S2():a(0) { }
  S2 & operator =(S2 &s2) { return *this; }
};
class S3 {
  int a;
public:
  S3():a(0) { }
  S3 &operator =(S3 &s3) { return *this; }
};
class S4 { // expected-note {{'S4' declared here}}
  int a;
  S4();
  S4 &operator =(const S4 &s4);
public:
  S4(int v):a(v) { }
};
class S5 { // expected-note {{'S5' declared here}}
  int a;
  S5():a(0) {}
  S5 &operator =(const S5 &s5) { return *this; }
public:
  S5(int v):a(v) { }
};
template <class T>
class ST {
public:
  static T s;
};


S2 k;
S3 h;
S4 l(3); // expected-note {{'l' defined here}}
S5 m(4); // expected-note {{'m' defined here}}
#pragma omp threadprivate(h, k, l, m)

int main(int argc, char **argv) {
  int i;
  #pragma omp parallel copyin // expected-error {{expected '(' after 'copyin'}}
  #pragma omp parallel copyin ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
  #pragma omp parallel copyin () // expected-error {{expected expression}}
  #pragma omp parallel copyin (k // expected-error {{expected ')'}} expected-note {{to match this '('}}
  #pragma omp parallel copyin (h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
  #pragma omp parallel copyin (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
  #pragma omp parallel copyin (l) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
  #pragma omp parallel copyin (S1) // expected-error {{'S1' does not refer to a value}}
  #pragma omp parallel copyin (argv[1]) // expected-error {{expected variable name}}
  #pragma omp parallel copyin(i) // expected-error {{copyin variable must be threadprivate}}
  #pragma omp parallel copyin(m) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
  #pragma omp parallel copyin(ST<int>::s) // expected-error {{copyin variable must be threadprivate}}
  foo();

  return 0;
}