| 1 |
! RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp %s | FileCheck %s |
| 2 |
! Check Unparsing of OpenMP Allocate directive |
| 3 |
|
| 4 |
program allocate_unparse |
| 5 |
use omp_lib |
| 6 |
|
| 7 |
real, dimension (:,:), allocatable :: darray |
| 8 |
integer :: a, b, m, n, t, x, y, z |
| 9 |
|
| 10 |
! 2.11.3 declarative allocate |
| 11 |
|
| 12 |
!$omp allocate(x, y) |
| 13 |
!$omp allocate(x, y) allocator(omp_default_mem_alloc) |
| 14 |
|
| 15 |
! 2.11.3 executable allocate |
| 16 |
|
| 17 |
!$omp allocate(a, b) |
| 18 |
allocate ( darray(a, b) ) |
| 19 |
!$omp allocate allocator(omp_default_mem_alloc) |
| 20 |
allocate ( darray(a, b) ) |
| 21 |
!$omp allocate(a, b) allocator(omp_default_mem_alloc) |
| 22 |
allocate ( darray(a, b) ) |
| 23 |
|
| 24 |
!$omp allocate(t) allocator(omp_const_mem_alloc) |
| 25 |
!$omp allocate(z) allocator(omp_default_mem_alloc) |
| 26 |
!$omp allocate(m) allocator(omp_default_mem_alloc) |
| 27 |
!$omp allocate(n) |
| 28 |
allocate ( darray(z, t) ) |
| 29 |
|
| 30 |
end program allocate_unparse |
| 31 |
|
| 32 |
!CHECK:!$OMP ALLOCATE (x,y) |
| 33 |
!CHECK:!$OMP ALLOCATE (x,y) ALLOCATOR(omp_default_mem_alloc) |
| 34 |
!CHECK:!$OMP ALLOCATE (a,b) |
| 35 |
!CHECK:ALLOCATE(darray(a,b)) |
| 36 |
!CHECK:!$OMP ALLOCATE ALLOCATOR(omp_default_mem_alloc) |
| 37 |
!CHECK:ALLOCATE(darray(a,b)) |
| 38 |
!CHECK:!$OMP ALLOCATE (a,b) ALLOCATOR(omp_default_mem_alloc) |
| 39 |
!CHECK:ALLOCATE(darray(a,b)) |
| 40 |
!CHECK:!$OMP ALLOCATE (t) ALLOCATOR(omp_const_mem_alloc) |
| 41 |
!CHECK:!$OMP ALLOCATE (z) ALLOCATOR(omp_default_mem_alloc) |
| 42 |
!CHECK:!$OMP ALLOCATE (m) ALLOCATOR(omp_default_mem_alloc) |
| 43 |
!CHECK:!$OMP ALLOCATE (n) |
| 44 |
!CHECK:ALLOCATE(darray(z,t)) |