Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/gomp/declare-target-3.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-fopenmp" } */ | |
3 | |
4 #pragma omp declare target | |
5 int a[] = { 1, 2, 3 }; | |
6 extern int b[]; /* { dg-error "'b' in declare target directive does not have mappable type" } */ | |
7 extern int c[]; /* { dg-error "'c' in declare target directive does not have mappable type" } */ | |
8 extern int d[]; /* { dg-error "'d' in declare target directive does not have mappable type" } */ | |
9 int d[3]; | |
10 #pragma omp end declare target | |
11 int c[3]; | |
12 int e[] = { 1, 2, 3 }; | |
13 #pragma omp declare target to (e) | |
14 extern int f[]; | |
15 #pragma omp declare target to (f) /* { dg-error "'f' does not have a mappable type in 'to' clause" } */ | |
16 extern int g[]; | |
17 #pragma omp declare target to (g) /* { dg-error "'g' does not have a mappable type in 'to' clause" } */ | |
18 int g[3]; | |
19 extern int h[]; | |
20 int h[3]; | |
21 #pragma omp declare target to (h) | |
22 | |
23 int i[] = { 1, 2, 3 }; | |
24 int j[] = { 1, 2, 3 }; | |
25 extern int k[]; | |
26 extern int l[]; | |
27 extern int m[]; | |
28 extern int n[]; | |
29 extern int o[]; | |
30 extern int p[]; | |
31 int k[3]; | |
32 int l[3]; | |
33 int q; | |
34 | |
35 void | |
36 foo (void) | |
37 { | |
38 #pragma omp target update to (q) to (i) | |
39 #pragma omp target map (tofrom: j) | |
40 ; | |
41 #pragma omp target update from (q) from (k) | |
42 #pragma omp target map (to: l) | |
43 ; | |
44 #pragma omp target update from (q) from (m) /* { dg-error "'m' does not have a mappable type in 'from' clause" } */ | |
45 #pragma omp target map (from: n) /* { dg-error "'n' does not have a mappable type in 'map' clause" } */ | |
46 ; | |
47 #pragma omp target update to (q) to (o) /* { dg-error "'o' does not have a mappable type in 'to' clause" } */ | |
48 #pragma omp target map (from: p) /* { dg-error "'p' does not have a mappable type in 'map' clause" } */ | |
49 ; | |
50 } | |
51 | |
52 int o[3]; | |
53 int p[3]; |