Debian Codegraph @

flang/test/Semantics/OpenMP/allocate-clause01.f90

raw
1 ! REQUIRES: openmp_runtime
2
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
4 ! OpenMP Version 5.2
5 ! The allocate clause's allocator modifier must be of type allocator_handle
6 ! and the align modifier must be constant, positive integer expression
7
8 subroutine allocate()
9 use omp_lib
10
11 integer, allocatable :: a, b, c
12
13 !ERROR: The parameter of the ALLOCATE clause must be a positive integer expression
14 !$omp allocators allocate(-1: a)
15 allocate(a)
16
17 !ERROR: The parameter of the ALLOCATE clause must be a positive integer expression
18 !$omp allocators allocate(allocator(-2), align(-3): b)
19 allocate(b)
20
21 !ERROR: The parameter of the ALLOCATE clause must be a positive integer expression
22 !$omp allocators allocate(align(-4): c)
23 allocate(c)
24 end subroutine