| ! REQUIRES: openmp_runtime | |
| ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=52 | |
| ! OpenMP Version 5.2 | |
| ! 6.7 allocators construct | |
| ! A list item that appears in an allocate clause must appear as | |
| ! one of the variables that is allocated by the allocate-stmt in | |
| ! the associated allocator structured block. | |
| subroutine allocate() | |
| use omp_lib | |
| integer, allocatable :: arr1(:), arr2(:, :), arr3(:), arr4(:, :) | |
| !$omp allocators allocate(arr3) | |
| allocate(arr3(3), arr4(4, 4)) | |
| !$omp end allocators | |
| !ERROR: A list item in an ALLOCATORS construct must be specified on the associated ALLOCATE statement | |
| !$omp allocators allocate(omp_default_mem_alloc: arr1, arr2) | |
| allocate(arr2(2, 2)) | |
| end subroutine allocate |