1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
3 ! 2.11.3 allocate Directive
4 ! A variable that is part of another variable (as an array or
5 ! structure element) cannot appear in an allocate directive.
12 type(my_type
) :: my_var
13 real, dimension (:,:), allocatable
:: darray
16 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the ALLOCATE directive
17 !$omp allocate(my_var%array)
19 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the ALLOCATE directive
20 !$omp allocate(darray, my_var%array) allocator(omp_default_mem_alloc)
21 allocate ( darray(a
, b
) )
23 end subroutine allocate