1 ! RUN: %S/test_errors.sh %s %t %flang_fc1 -fopenmp
4 ! 2.11.3 allocate Directive
5 ! A variable that is part of another variable (as an array or
6 ! structure element) cannot appear in an allocate directive.
13 type(my_type
) :: my_var
14 real, dimension (:,:), allocatable
:: darray
17 !!ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in an ALLOCATE directive
18 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a PRIVATE or SHARED clause or 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 in a PRIVATE or SHARED clause or 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