1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
5 ! 2.11.3 allocate Directive
6 ! A variable that is part of another variable (as an array or
7 ! structure element) cannot appear in an allocate directive.
14 type(my_type
) :: my_var
15 real, dimension (:,:), allocatable
:: darray
18 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the ALLOCATE directive
19 !$omp allocate(my_var%array)
21 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the ALLOCATE directive
22 !$omp allocate(darray, my_var%array) allocator(omp_default_mem_alloc)
23 allocate ( darray(a
, b
) )
25 end subroutine allocate