brintos

brintos / llvm-project-archived public Read only

0
0
Text · 747 B · a334206 Raw
24 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=504! OpenMP Version 5.25! 6.7 allocators construct6! A list item that appears in an allocate clause must appear as7! one of the variables that is allocated by the allocate-stmt in8! the associated allocator structured block.9 10subroutine allocate()11use omp_lib12 13  integer, allocatable :: arr1(:), arr2(:, :), arr3(:), arr4(:, :)14 15  !$omp allocators allocate(arr3)16    allocate(arr3(3), arr4(4, 4))17  !$omp end allocators18 19  !ERROR: A list item in an ALLOCATORS construct must be specified on the associated ALLOCATE statement20  !$omp allocators allocate(omp_default_mem_alloc: arr1, arr2)21    allocate(arr2(2, 2))22 23end subroutine allocate24