aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/goacc/reduction-promotions.c
blob: e469e9bf225d65db0d2b2dafccc97f2dee25a6ab (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
/* Integer reductions.  */

#define n 1000

int
main(void)
{
  int v1, v2;

#pragma acc parallel reduction(+:v1,v2)
  ;
#pragma acc parallel reduction(+:v1,v2) copy(v1,v2)
  ;
#pragma acc parallel reduction(+:v1,v2) pcopy(v1,v2)
  ;
#pragma acc parallel reduction(+:v1,v2) present(v1,v2)
  ;
#pragma acc parallel reduction(+:v1,v2) copyin(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc parallel reduction(+:v1,v2) pcopyin(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc parallel reduction(+:v1,v2) copyout(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc parallel reduction(+:v1,v2) pcopyout(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc parallel reduction(+:v1,v2) create(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc parallel reduction(+:v1,v2) pcreate(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;


#pragma acc serial reduction(+:v1,v2)
  ;
#pragma acc serial reduction(+:v1,v2) copy(v1,v2)
  ;
#pragma acc serial reduction(+:v1,v2) pcopy(v1,v2)
  ;
#pragma acc serial reduction(+:v1,v2) present(v1,v2)
  ;
#pragma acc serial reduction(+:v1,v2) copyin(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc serial reduction(+:v1,v2) pcopyin(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc serial reduction(+:v1,v2) copyout(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc serial reduction(+:v1,v2) pcopyout(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc serial reduction(+:v1,v2) create(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;
#pragma acc serial reduction(+:v1,v2) pcreate(v1,v2) /* { dg-warning "incompatible data clause with reduction" } */
  ;


  return 0;
}