File: parallel-tree.f95

package info (click to toggle)
gcc-arm-none-eabi 15%3A12.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 959,712 kB
  • sloc: cpp: 3,275,382; ansic: 2,061,766; ada: 840,956; f90: 208,513; makefile: 76,132; asm: 73,433; xml: 50,448; exp: 34,146; sh: 32,436; objc: 15,637; fortran: 14,012; python: 11,991; pascal: 6,787; awk: 4,779; perl: 3,054; yacc: 338; ml: 285; lex: 201; haskell: 122
file content (50 lines) | stat: -rw-r--r-- 2,548 bytes parent folder | download
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
! { dg-additional-options "-fdump-tree-original" }

! test for tree-dump-original and spaces-commas

! { dg-additional-options -Wuninitialized }

! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.

program test
  implicit none
  integer :: q, i, j, k, m, n, o, p, r, s, t, u, v, w
  ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
  logical :: l = .true.

  !$acc parallel if(l) async num_gangs(i) num_workers(i) vector_length(i) &
  !$acc reduction(max:q), copy(i), copyin(j), copyout(k), create(m) &
  !$acc no_create(n) &
  !$acc present(o), pcopy(p), pcopyin(r), pcopyout(s), pcreate(t) &
  !$acc deviceptr(u), private(v), firstprivate(w)
  ! { dg-warning {'i' is used uninitialized} {} { target *-*-* } .-1 }
  ! { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-2 }
  ! { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-3 }
  ! { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-4 }
  !$acc end parallel

end program test

! { dg-final { scan-tree-dump-times "pragma acc parallel" 1 "original" } } 

! { dg-final { scan-tree-dump-times "if" 1 "original" } }
! { dg-final { scan-tree-dump-times "async" 1 "original" } } 
! { dg-final { scan-tree-dump-times "num_gangs" 1 "original" } } 
! { dg-final { scan-tree-dump-times "num_workers" 1 "original" } } 
! { dg-final { scan-tree-dump-times "vector_length" 1 "original" } } 

! { dg-final { scan-tree-dump-times "reduction\\(max:q\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(tofrom:i\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(to:j\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(from:k\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(alloc:m\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(no_alloc:n\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(force_present:o\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(tofrom:p\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(to:r\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(from:s\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "map\\(alloc:t\\)" 1 "original" } } 

! { dg-final { scan-tree-dump-times "map\\(force_deviceptr:u\\)" 1 "original" } } 
! { dg-final { scan-tree-dump-times "private\\(v\\)" 1 "original" } }