1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=50
5 !2.11.4 Allocate Clause
6 !For any list item that is specified in the allocate
7 !clause on a directive, a data-sharing attribute clause
8 !that may create a private copy of that list item must be
9 !specified on the same directive.
13 !ERROR: The ALLOCATE clause requires that 'x' must be listed in a private data-sharing attribute clause on the same directive
14 !$omp parallel allocate(omp_default_mem_space : x)
20 !ERROR: The ALLOCATE clause requires that 'y' must be listed in a private data-sharing attribute clause on the same directive
21 !$omp parallel allocate(omp_default_mem_space : y) firstprivate(x)
27 !ERROR: The ALLOCATE clause requires that 'x' must be listed in a private data-sharing attribute clause on the same directive
28 !ERROR: The ALLOCATE clause requires that 'x' must be listed in a private data-sharing attribute clause on the same directive
29 !$omp parallel allocate(omp_default_mem_space : x) allocate(omp_default_mem_space : x)
35 !ERROR: The ALLOCATE clause requires that 'f' must be listed in a private data-sharing attribute clause on the same directive
36 !$omp parallel allocate(omp_default_mem_space : f) shared(f)
42 !ERROR: The ALLOCATE clause requires that 'q' must be listed in a private data-sharing attribute clause on the same directive
43 !$omp parallel private(t) allocate(omp_default_mem_space : z, t, q, r) firstprivate(z, r)
49 !ERROR: The ALLOCATE clause requires that 'b' must be listed in a private data-sharing attribute clause on the same directive
50 !ERROR: The ALLOCATE clause requires that 'c' must be listed in a private data-sharing attribute clause on the same directive
51 !$omp parallel allocate(omp_default_mem_space : a, b, c, d) firstprivate(a, d)