Debian Codegraph @

gcc/testsuite/c-c++-common/gomp/defaultmap-6.c

raw
1 void f()
2 {
3 struct s {
4 int i;
5 };
6 int scalar1 = 5;
7 int array1[5] = {1,2,3,4,5};
8 int *ptr1 = &scalar1;
9 struct s mystruct1 = {.i = 5};
10
11 #pragma omp target defaultmap(firstprivate ) defaultmap(firstprivate : aggregate) /* { dg-error "too many 'defaultmap' clauses with 'aggregate' category" } */
12 {
13 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
14 }
15
16 #pragma omp target defaultmap(firstprivate : all ) defaultmap(alloc : pointer) /* { dg-error "too many 'defaultmap' clauses with 'pointer' category" } */
17 {
18 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
19 }
20
21
22 #pragma omp target defaultmap(firstprivate : aggregate) defaultmap(firstprivate ) /* { dg-error "too many 'defaultmap' clauses with 'aggregate' category" } */
23 {
24 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
25 }
26
27 #pragma omp target defaultmap(alloc : pointer) defaultmap(firstprivate : all ) /* { dg-error "too many 'defaultmap' clauses with 'pointer' category" } */
28 {
29 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
30 }
31
32 #pragma omp target defaultmap(firstprivate :all ) defaultmap(firstprivate : all) /* { dg-error "too many 'defaultmap' clauses with 'all' category" } */
33 {
34 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
35 }
36 #pragma omp target defaultmap(firstprivate ) defaultmap(firstprivate) /* { dg-error "too many 'defaultmap' clauses with unspecified category" } */
37 {
38 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
39 }
40 #pragma omp target defaultmap(firstprivate ) defaultmap(firstprivate : all) /* { dg-error "too many 'defaultmap' clauses with 'all' category" } */
41 {
42 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
43 }
44 #pragma omp target defaultmap(firstprivate : all) defaultmap(firstprivate) /* { dg-error "too many 'defaultmap' clauses with 'all' category" } */
45 {
46 scalar1 = 1; array1[0] = 2; if (ptr1 == 0L) mystruct1.i = 3;
47 }
48 }