tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / depobj-2.f90
blob6e7441d8d00e19db565abe8436a45676e5c5b388
1 ! { dg-do compile { target { fortran_integer_16 || ilp32 } } }
2 ! omp_depend_kind = 2*intptr_t --> 16 (128 bit) on 64bit-pointer systems
3 ! --> 8 (128 bit) on 32bit-pointer systems
4 subroutine f1
5 !use omp_lib ! N/A in gcc/testsuite
6 use iso_c_binding, only: c_intptr_t
7 implicit none
8 integer, parameter :: omp_depend_kind = 2*c_intptr_t
9 integer :: a, b
10 integer(kind=omp_depend_kind) :: depobj, depobj1(5)
11 real :: r
12 integer(1) :: d
14 !$omp depobj ! { dg-error "Expected '\\( depobj \\)\'" }
15 !$omp depobj(depobj) ! { dg-error "Expected DEPEND, UPDATE, or DESTROY clause" }
16 !$omp depobj destroy ! { dg-error "Expected '\\( depobj \\)\'" }
17 !$omp depobj ( depobj1 ( 1 ) ) depend( inout : a) ! OK
18 !$omp depobj(depobj1) depend( inout : a) ! { dg-error "DEPOBJ in DEPOBJ construct at .1. shall be a scalar integer of OMP_DEPEND_KIND kind" }
19 !$omp depobj(depobj1(:)) depend( inout : a) ! { dg-error "DEPOBJ in DEPOBJ construct at .1. shall be a scalar integer of OMP_DEPEND_KIND kind" }
20 !$omp depobj(r) depend( inout : a) ! { dg-error "DEPOBJ in DEPOBJ construct at .1. shall be a scalar integer of OMP_DEPEND_KIND kind" }
21 !$omp depobj(d) depend( inout : a) ! { dg-error "DEPOBJ in DEPOBJ construct at .1. shall be a scalar integer of OMP_DEPEND_KIND kind" }
22 !$omp depobj(depobj) depend( inout : a, b) ! { dg-error "DEPEND clause at .1. of OMP DEPOBJ construct shall have only a single locator" }
23 !$omp depobj(depobj) depend(mutexinoutset : a) ! OK
24 !$omp depobj(depobj) depend(source) ! { dg-error "SOURCE at .1. not permitted as dependence-type for this directive" }
25 !$omp depobj(depobj) depend(sink : i + 1) ! { dg-error "SINK at .1. not permitted as dependence-type for this directive" }
26 !$omp depobj(depobj) update(source) ! { dg-error "Expected IN, OUT, INOUT, INOUTSET or MUTEXINOUTSET followed by '\\)'" }
27 !$omp depobj(depobj) update(sink) ! { dg-error "Expected IN, OUT, INOUT, INOUTSET or MUTEXINOUTSET followed by '\\)'" }
28 !$omp depobj(depobj) update(depobj) ! { dg-error "Expected IN, OUT, INOUT, INOUTSET or MUTEXINOUTSET followed by '\\)'" }
30 ! Valid in OpenMP 5.1:
31 !$omp depobj(depobj5) depend(depobj: depobj3) ! { dg-error "DEPEND clause at .1. of OMP DEPOBJ construct shall not have dependence-type DEPOBJ" }
32 end subroutine f1