alloc-comp-3.f90 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. ! { dg-do run }
  2. ! Don't cycle by default through all options, just test -O0 and -O2,
  3. ! as this is quite large test.
  4. ! { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } }
  5. module m
  6. type dl
  7. integer :: a, b
  8. integer, allocatable :: c(:,:)
  9. integer :: d, e
  10. integer, allocatable :: f
  11. end type
  12. type dt
  13. integer :: g
  14. type (dl), allocatable :: h(:)
  15. integer :: i
  16. type (dl) :: j(2, 2)
  17. type (dl), allocatable :: k
  18. end type
  19. contains
  20. subroutine ver_dl (obj, val, c, cl1, cu1, cl2, cu2, f)
  21. type (dl), intent (in) :: obj
  22. integer, intent (in) :: val, cl1, cu1, cl2, cu2
  23. logical, intent (in) :: c, f
  24. if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) call abort
  25. if (c) then
  26. if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) call abort
  27. if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) call abort
  28. end if
  29. if (val /= 0) then
  30. if (obj%a /= val .or. obj%b /= val) call abort
  31. if (obj%d /= val .or. obj%e /= val) call abort
  32. if (c) then
  33. if (any (obj%c /= val)) call abort
  34. end if
  35. if (f) then
  36. if (obj%f /= val) call abort
  37. end if
  38. end if
  39. end subroutine ver_dl
  40. subroutine ver_dt (obj, val, h, hl, hu, k, c, cl1, cu1, cl2, cu2, f)
  41. type (dt), intent (in) :: obj
  42. integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2
  43. logical, intent (in) :: h, k, c, f
  44. integer :: i, j
  45. if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) call abort
  46. if (h) then
  47. if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) call abort
  48. do i = hl, hu
  49. call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f)
  50. end do
  51. end if
  52. do i = 1, 2
  53. do j = 1, 2
  54. call ver_dl (obj%j(i, j), val, c, cl1, cu1, cl2, cu2, f)
  55. end do
  56. end do
  57. if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f)
  58. if (val /= 0) then
  59. if (obj%g /= val .or. obj%i /= val) call abort
  60. end if
  61. end subroutine ver_dt
  62. subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f)
  63. type (dl), intent (inout) :: obj
  64. integer, intent (in) :: val, cl1, cu1, cl2, cu2
  65. logical, intent (in) :: c, f
  66. if (val /= 0) then
  67. obj%a = val
  68. obj%b = val
  69. obj%d = val
  70. obj%e = val
  71. end if
  72. if (allocated (obj%c)) deallocate (obj%c)
  73. if (c) then
  74. allocate (obj%c(cl1:cu1, cl2:cu2))
  75. if (val /= 0) obj%c = val
  76. end if
  77. if (f) then
  78. if (.not.allocated (obj%f)) allocate (obj%f)
  79. if (val /= 0) obj%f = val
  80. else
  81. if (allocated (obj%f)) deallocate (obj%f)
  82. end if
  83. end subroutine alloc_dl
  84. subroutine alloc_dt (obj, val, h, hl, hu, k, c, cl1, cu1, cl2, cu2, f)
  85. type (dt), intent (inout) :: obj
  86. integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2
  87. logical, intent (in) :: h, k, c, f
  88. integer :: i, j
  89. if (val /= 0) then
  90. obj%g = val
  91. obj%i = val
  92. end if
  93. if (allocated (obj%h)) deallocate (obj%h)
  94. if (h) then
  95. allocate (obj%h(hl:hu))
  96. do i = hl, hu
  97. call alloc_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f)
  98. end do
  99. end if
  100. do i = 1, 2
  101. do j = 1, 2
  102. call alloc_dl (obj%j(i, j), val, c, cl1, cu1, cl2, cu2, f)
  103. end do
  104. end do
  105. if (k) then
  106. if (.not.allocated (obj%k)) allocate (obj%k)
  107. call alloc_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f)
  108. else
  109. if (allocated (obj%k)) deallocate (obj%k)
  110. end if
  111. end subroutine alloc_dt
  112. end module m
  113. use m
  114. type (dt), allocatable :: z(:,:)
  115. type (dt) :: y(2:3)
  116. call foo (y, z, 4)
  117. contains
  118. subroutine foo (y, z, n)
  119. use m
  120. integer :: n
  121. type (dt) :: x(2:n), y(3:)
  122. type (dt), allocatable :: z(:,:)
  123. logical, parameter :: F = .false.
  124. logical, parameter :: T = .true.
  125. logical :: l
  126. if (lbound (x, 1) /= 2 .or. ubound (x, 1) /= 4) call abort
  127. if (lbound (y, 1) /= 3 .or. ubound (y, 1) /= 4) call abort
  128. call ver_dt (x(2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  129. call ver_dt (x(n), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  130. call ver_dt (y(3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  131. call ver_dt (y(4), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  132. !$omp parallel private (z)
  133. if (allocated (z)) call abort
  134. !$omp end parallel
  135. !$omp parallel firstprivate (z)
  136. if (allocated (z)) call abort
  137. !$omp end parallel
  138. l = F
  139. !$omp parallel sections lastprivate (z) firstprivate (l)
  140. !$omp section
  141. if (.not. l) then
  142. if (allocated (z)) call abort
  143. end if
  144. !$omp section
  145. if (.not. l) then
  146. if (allocated (z)) call abort
  147. end if
  148. allocate (z(-3:-3,2:3))
  149. call alloc_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  150. call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  151. call alloc_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  152. call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  153. !$omp section
  154. !$omp end parallel sections
  155. if (.not.allocated (z)) call abort
  156. if (lbound (z, 1) /= -3 .or. ubound (z, 1) /= -3) call abort
  157. if (lbound (z, 2) /= 2 .or. ubound (z, 2) /= 3) call abort
  158. call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  159. call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  160. call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  161. call ver_dt (y(4), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  162. call alloc_dt (z(-3,2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  163. call ver_dt (z(-3,2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  164. call alloc_dt (z(-3,3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  165. call ver_dt (z(-3,3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  166. !$omp parallel private (x, y, z)
  167. call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  168. call alloc_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  169. call ver_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  170. call ver_dt (y(4), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  171. call alloc_dt (y(4), 14, T, 3, 4, F, T, 1, 1, 2, 4, T)
  172. call ver_dt (y(4), 14, T, 3, 4, F, T, 1, 1, 2, 4, T)
  173. call ver_dt (z(-3,2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  174. call alloc_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  175. call ver_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  176. call ver_dt (z(-3,3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  177. call alloc_dt (z(-3,3), 14, T, 3, 4, F, T, 1, 1, 2, 4, T)
  178. call ver_dt (z(-3,3), 14, T, 3, 4, F, T, 1, 1, 2, 4, T)
  179. !$omp end parallel
  180. call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  181. call alloc_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  182. call ver_dt (y(4), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  183. call alloc_dt (y(4), 14, T, 3, 4, F, T, 1, 1, 2, 4, T)
  184. call ver_dt (z(-3,2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  185. call alloc_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  186. call ver_dt (z(-3,3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  187. call alloc_dt (z(-3,3), 14, T, 3, 4, F, T, 1, 1, 2, 4, T)
  188. !$omp parallel private (x, y, z)
  189. call ver_dt (x(n - 1), 0, T, -3, -1, T, T, -1, -1, 2, 3, T)
  190. call ver_dt (y(4), 0, T, 3, 4, F, T, 1, 1, 2, 4, T)
  191. deallocate (x(n - 1)%h, x(n - 1)%k)
  192. deallocate (y(4)%h)
  193. allocate (y(4)%k)
  194. call ver_dt (z(-3,2), 0, T, -3, -1, T, T, -1, -1, 2, 3, T)
  195. call ver_dt (z(-3,3), 0, T, 3, 4, F, T, 1, 1, 2, 4, T)
  196. deallocate (z(-3,2)%h, z(-3,2)%k)
  197. deallocate (z(-3,3)%h)
  198. allocate (z(-3,3)%k)
  199. !$omp end parallel
  200. call alloc_dt (x(n - 1), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
  201. call alloc_dt (y(4), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
  202. call alloc_dt (z(-3,2), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
  203. call alloc_dt (z(-3,3), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
  204. !$omp parallel firstprivate (x, y, z)
  205. if (lbound (x, 1) /= 2 .or. ubound (x, 1) /= 4) call abort
  206. if (lbound (y, 1) /= 3 .or. ubound (y, 1) /= 4) call abort
  207. call ver_dt (x(n - 1), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
  208. call alloc_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  209. call ver_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  210. call ver_dt (y(4), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
  211. call alloc_dt (y(4), 4, T, 3, 4, T, T, 1, 1, 2, 4, T)
  212. call ver_dt (y(4), 4, T, 3, 4, T, T, 1, 1, 2, 4, T)
  213. call ver_dt (z(-3,2), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
  214. call alloc_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  215. call ver_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  216. call ver_dt (z(-3,3), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
  217. call alloc_dt (z(-3,3), 4, T, 3, 4, T, T, 1, 1, 2, 4, T)
  218. call ver_dt (z(-3,3), 4, T, 3, 4, T, T, 1, 1, 2, 4, T)
  219. !$omp end parallel
  220. call ver_dt (x(n - 1), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
  221. call alloc_dt (x(n - 1), 4, F, 0, 0, F, F, 0, 0, 0, 0, F)
  222. call ver_dt (y(4), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
  223. call alloc_dt (y(4), 16, F, 0, 0, F, F, 0, 0, 0, 0, F)
  224. call ver_dt (z(-3,2), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
  225. call alloc_dt (z(-3,2), 4, F, 0, 0, F, F, 0, 0, 0, 0, F)
  226. call ver_dt (z(-3,3), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
  227. call alloc_dt (z(-3,3), 16, F, 0, 0, F, F, 0, 0, 0, 0, F)
  228. !$omp parallel firstprivate (x, y, z)
  229. call ver_dt (x(n - 1), 4, F, 0, 0, F, F, 0, 0, 0, 0, F)
  230. call alloc_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  231. call ver_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  232. call ver_dt (y(4), 16, F, 0, 0, F, F, 0, 0, 0, 0, F)
  233. call alloc_dt (y(4), 17, T, 1, 2, F, T, 2, 2, 3, 3, F)
  234. call ver_dt (y(4), 17, T, 1, 2, F, T, 2, 2, 3, 3, F)
  235. call ver_dt (z(-3,2), 4, F, 0, 0, F, F, 0, 0, 0, 0, F)
  236. call alloc_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  237. call ver_dt (z(-3,2), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
  238. call ver_dt (z(-3,3), 16, F, 0, 0, F, F, 0, 0, 0, 0, F)
  239. call alloc_dt (z(-3,3), 17, T, 1, 2, F, T, 2, 2, 3, 3, F)
  240. call ver_dt (z(-3,3), 17, T, 1, 2, F, T, 2, 2, 3, 3, F)
  241. !$omp end parallel
  242. call ver_dt (x(n - 1), 4, F, 0, 0, F, F, 0, 0, 0, 0, F)
  243. call ver_dt (y(4), 16, F, 0, 0, F, F, 0, 0, 0, 0, F)
  244. call alloc_dt (y(4), 18, T, 0, 1, T, T, 0, 1, 0, 1, T)
  245. call ver_dt (z(-3,2), 4, F, 0, 0, F, F, 0, 0, 0, 0, F)
  246. call ver_dt (z(-3,3), 16, F, 0, 0, F, F, 0, 0, 0, 0, F)
  247. call alloc_dt (z(-3,3), 18, T, 0, 1, T, T, 0, 1, 0, 1, T)
  248. l = F
  249. !$omp parallel sections lastprivate (x, y, z) firstprivate (l)
  250. !$omp section
  251. if (l) then
  252. call ver_dt (x(n - 1), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  253. call ver_dt (y(4), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  254. call ver_dt (z(-3,2), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  255. call ver_dt (z(-3,3), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  256. else
  257. call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  258. call ver_dt (y(4), 0, T, 0, 1, T, T, 0, 1, 0, 1, T)
  259. call ver_dt (z(-3,2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  260. call ver_dt (z(-3,3), 0, T, 0, 1, T, T, 0, 1, 0, 1, T)
  261. end if
  262. l = T
  263. call alloc_dt (x(n - 1), 7, T, 1, 1, T, T, 1, 2, 3, 3, T)
  264. call ver_dt (x(n - 1), 7, T, 1, 1, T, T, 1, 2, 3, 3, T)
  265. call alloc_dt (y(4), 20, T, 0, 0, F, T, 2, 2, 3, 4, F)
  266. call ver_dt (y(4), 20, T, 0, 0, F, T, 2, 2, 3, 4, F)
  267. call alloc_dt (z(-3,2), 7, T, 1, 1, T, T, 1, 2, 3, 3, T)
  268. call ver_dt (z(-3,2), 7, T, 1, 1, T, T, 1, 2, 3, 3, T)
  269. call alloc_dt (z(-3,3), 20, T, 0, 0, F, T, 2, 2, 3, 4, F)
  270. call ver_dt (z(-3,3), 20, T, 0, 0, F, T, 2, 2, 3, 4, F)
  271. !$omp section
  272. if (l) then
  273. call ver_dt (x(n - 1), 7, T, 1, 1, T, T, 1, 2, 3, 3, T)
  274. call ver_dt (y(4), 20, T, 0, 0, F, T, 2, 2, 3, 4, F)
  275. call ver_dt (z(-3,2), 7, T, 1, 1, T, T, 1, 2, 3, 3, T)
  276. call ver_dt (z(-3,3), 20, T, 0, 0, F, T, 2, 2, 3, 4, F)
  277. else
  278. call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  279. call ver_dt (y(4), 0, T, 0, 1, T, T, 0, 1, 0, 1, T)
  280. call ver_dt (z(-3,2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  281. call ver_dt (z(-3,3), 0, T, 0, 1, T, T, 0, 1, 0, 1, T)
  282. end if
  283. l = T
  284. call alloc_dt (x(n - 1), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  285. call ver_dt (x(n - 1), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  286. call alloc_dt (y(4), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  287. call ver_dt (y(4), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  288. call alloc_dt (z(-3,2), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  289. call ver_dt (z(-3,2), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  290. call alloc_dt (z(-3,3), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  291. call ver_dt (z(-3,3), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  292. !$omp section
  293. !$omp end parallel sections
  294. call ver_dt (x(n - 1), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  295. call ver_dt (y(4), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  296. call ver_dt (z(-3,2), 9, T, 1, 1, F, F, 0, 0, 0, 0, T)
  297. call ver_dt (z(-3,3), 21, F, 0, 0, T, T, 1, 2, 3, 4, T)
  298. !$omp parallel sections lastprivate (x, y, z) firstprivate (l)
  299. !$omp section
  300. if (l) then
  301. call ver_dt (x(n - 1), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  302. call ver_dt (y(4), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  303. call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  304. call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  305. else
  306. call ver_dt (x(n - 1), 0, T, 1, 1, F, F, 0, 0, 0, 0, T)
  307. call ver_dt (y(4), 0, F, 0, 0, T, T, 1, 2, 3, 4, T)
  308. call ver_dt (z(-3,2), 0, T, 1, 1, F, F, 0, 0, 0, 0, T)
  309. call ver_dt (z(-3,3), 0, F, 0, 0, T, T, 1, 2, 3, 4, T)
  310. end if
  311. l = T
  312. call alloc_dt (x(n - 1), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  313. call ver_dt (x(n - 1), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  314. call alloc_dt (y(4), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  315. call ver_dt (y(4), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  316. call alloc_dt (z(-3,2), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  317. call ver_dt (z(-3,2), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  318. call alloc_dt (z(-3,3), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  319. call ver_dt (z(-3,3), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  320. !$omp section
  321. if (l) then
  322. call ver_dt (x(n - 1), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  323. call ver_dt (y(4), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  324. call ver_dt (z(-3,2), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  325. call ver_dt (z(-3,3), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  326. else
  327. call ver_dt (x(n - 1), 0, T, 1, 1, F, F, 0, 0, 0, 0, T)
  328. call ver_dt (y(4), 0, F, 0, 0, T, T, 1, 2, 3, 4, T)
  329. call ver_dt (z(-3,2), 0, T, 1, 1, F, F, 0, 0, 0, 0, T)
  330. call ver_dt (z(-3,3), 0, F, 0, 0, T, T, 1, 2, 3, 4, T)
  331. end if
  332. l = T
  333. call alloc_dt (x(n - 1), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  334. call ver_dt (x(n - 1), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  335. call alloc_dt (y(4), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  336. call ver_dt (y(4), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  337. call alloc_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  338. call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  339. call alloc_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  340. call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  341. !$omp section
  342. !$omp end parallel sections
  343. call ver_dt (x(n - 1), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  344. call ver_dt (y(4), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  345. call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  346. call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  347. !$omp parallel private (x, y, z)
  348. call ver_dt (x(n - 1), 0, F, 0, 0, T, T, -1, -1, -1, -1, T)
  349. call ver_dt (y(4), 0, T, 0, 1, T, T, 2, 2, 2, 2, F)
  350. call ver_dt (z(-3,2), 0, F, 0, 0, T, T, -1, -1, -1, -1, T)
  351. call ver_dt (z(-3,3), 0, T, 0, 1, T, T, 2, 2, 2, 2, F)
  352. !$omp single
  353. call alloc_dt (x(n - 1), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  354. call alloc_dt (y(4), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  355. call alloc_dt (z(-3,2), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  356. call alloc_dt (z(-3,3), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  357. !$omp end single copyprivate (x, y, z)
  358. call ver_dt (x(n - 1), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  359. call ver_dt (y(4), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  360. call ver_dt (z(-3,2), 3, F, 0, 0, T, T, 0, 1, 0, 1, F)
  361. call ver_dt (z(-3,3), 22, T, 5, 5, F, T, 2, 3, 2, 2, T)
  362. !$omp end parallel
  363. call ver_dt (x(n - 1), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  364. call ver_dt (y(4), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  365. call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
  366. call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
  367. call ver_dt (x(2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  368. call ver_dt (x(n), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  369. call ver_dt (y(3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
  370. end subroutine foo
  371. end