22 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=524! OpenMP Version 5.25! The allocate clause's allocator modifier must be of type allocator_handle6! and the align modifier must be constant, positive integer expression7 8program allocate_align_tree9 use omp_lib10 integer, allocatable :: j(:), xarray(:)11 integer :: z, t, xx12 t = 213 z = 314 !WARNING: The executable form of the OpenMP ALLOCATE directive has been deprecated, please use ALLOCATORS instead [-Wopen-mp-usage]15 !ERROR: Must be a constant value16!$omp allocate(j) align(xx)17 !ERROR: The alignment should be positive18!$omp allocate(xarray) align(-32) allocator(omp_large_cap_mem_alloc)19 allocate(j(z), xarray(t))20end program allocate_align_tree21 22