File: teams-6.f90

package info (click to toggle)
gcc-arm-none-eabi 15%3A14.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,099,328 kB
  • sloc: cpp: 3,627,108; ansic: 2,571,498; ada: 834,230; f90: 235,082; makefile: 79,231; asm: 74,984; xml: 51,692; exp: 39,736; sh: 33,298; objc: 15,629; python: 15,069; fortran: 14,429; pascal: 7,003; awk: 5,070; perl: 3,106; ml: 285; lisp: 253; lex: 204; haskell: 135
file content (88 lines) | stat: -rw-r--r-- 3,160 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
! { dg-do compile }

! PR fortran/110725
! PR middle-end/71065


subroutine one
!$omp target  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
block
  integer :: i   ! <<< invalid: variable declaration
  !$omp teams  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
  i = 5
  !$omp end teams
end block

!$omp target  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
block
  type t   ! <<< invalid: type declaration
  end type t
  !$omp teams  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
  i = 5
  !$omp end teams
end block

!$omp target
  ! The following is invalid - but not detected as ST_NONE is returned:
  !$omp error at(compilation) severity(warning)  ! { dg-warning "OMP ERROR encountered" }
  !$omp teams
  i = 5
  !$omp end teams
!$omp end target

!$omp target
  ! The following is invalid - but not detected as ST_NONE is returned:
  !$omp nothing ! <<< invalid: directive
  !$omp teams
  i = 5
  !$omp end teams
!$omp end target


!$omp target  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
block
  do i = 5, 8
    !$omp teams
    block; end block
  end do
end block

end


subroutine two
!$omp target ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
block
  integer :: i   ! <<< invalid: variable declaration
  !$omp teams distribute  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
    do i = 1, 5
    end do
  !$omp end teams distribute
end block

!$omp target  ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
block
  type t   ! <<< invalid: type declaration
  end type t
  !$omp teams distribute parallel do ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
  do i = 1, 5
  end do
end block

!$omp target
  ! The following is invalid - but not detected as ST_NONE is returned:
  !$omp error at(compilation) severity(warning)  ! { dg-warning "OMP ERROR encountered" }
  !$omp teams loop
  do i = 5, 10
  end do
!$omp end target

!$omp target
  ! The following is invalid - but not detected as ST_NONE is returned:
  !$omp nothing ! <<< invalid: directive
  !$omp teams distribute simd
  do i = -3, 5
  end do
  !$omp end teams distribute simd
!$omp end target
end