bolt/deps/llvm-18.1.8/flang/test/Semantics/OpenMP/allocate06.f90
2025-02-14 19:21:04 +01:00

18 lines
695 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! List items specified in the allocate directive must not have the ALLOCATABLE attribute unless the directive is associated with an
! allocate statement.
subroutine allocate()
use omp_lib
integer :: a, b, x
real, dimension (:,:), allocatable :: darray
!ERROR: List items specified in the ALLOCATE directive must not have the ALLOCATABLE attribute unless the directive is associated with an ALLOCATE statement
!$omp allocate(darray) allocator(omp_default_mem_alloc)
!$omp allocate(darray) allocator(omp_default_mem_alloc)
allocate(darray(a, b))
end subroutine allocate