[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git] / flang / test / Semantics / OpenMP / threadprivate03.f90
blobb466a8e05e9c28ffea9ac7d6bb26898b1d89bc9c
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -pedantic
2 ! OpenMP Version 5.1
3 ! Check OpenMP construct validity for the following directives:
4 ! 2.21.2 Threadprivate Directive
6 module mod1
7 end
9 program main
10 use mod1
11 integer, parameter :: i = 1
13 !ERROR: The module name or main program name cannot be in a THREADPRIVATE directive
14 !$omp threadprivate(mod1)
16 !PORTABILITY: Name 'main' declared in a main program should not have the same name as the main program
17 !ERROR: The module name or main program name cannot be in a THREADPRIVATE directive
18 !$omp threadprivate(main)
20 !ERROR: The entity with PARAMETER attribute cannot be in a THREADPRIVATE directive
21 !$omp threadprivate(i)
23 contains
24 subroutine sub()
25 !ERROR: The procedure name cannot be in a THREADPRIVATE directive
26 !$omp threadprivate(sub)
27 end
28 end