aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/allocate-3.f90
blob: 1fa0bb932c3eaf9fecb76afeeaa3609b983c1ee5 (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
! { dg-do compile }

use omp_lib
implicit none
integer :: q, x,y,z

!$omp parallel allocate(align ( 64 ) x)  ! { dg-error "37:Expected ':' at" }
!$omp parallel allocate(align ( 64 ), x)  ! { dg-error "37:Expected ':' at" }
!$omp parallel allocate(allocator ( omp_high_bw_mem_alloc ) x)  ! { dg-error "60:Expected ':' at" }
!$omp parallel allocate(allocator ( omp_high_bw_mem_alloc ) , x)  ! { dg-error "60:Expected ':' at" }

!$omp parallel allocate( omp_high_bw_mem_alloc, align(12) : x)  ! { dg-error "26:Expected variable list at" }
!$omp parallel allocate( align(12), omp_high_bw_mem_alloc : x)  ! { dg-error "35:Expected ':' at" }

!$omp parallel allocate( omp_high_bw_mem_alloc x)  ! { dg-error "26:Expected variable list at" }

!$omp parallel allocate( omp_high_bw_mem_alloc , x) firstprivate(x) ! { dg-error "'omp_high_bw_mem_alloc' specified in 'allocate' clause at \\(1\\) but not in an explicit privatization clause" }
! { dg-error "Object 'omp_high_bw_mem_alloc' is not a variable" "" { target *-*-* } .-1 }
!$omp end parallel

!$omp parallel allocate( omp_high_bw_mem_alloc , x) firstprivate(x, omp_high_bw_mem_alloc)
! { dg-error "Object 'omp_high_bw_mem_alloc' is not a variable" "" { target *-*-* } .-1 }
!$omp end parallel

!$omp parallel allocate( align(128) : x) firstprivate(x) ! OK
!$omp end parallel

end