[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-threadprivate03.f90
blob5a9e0dbaad9876368a0400047c3892d7b0a7036b
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
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 !ERROR: The module name or main program name cannot be in a THREADPRIVATE directive
17 !$omp threadprivate(main)
19 !ERROR: The entity with PARAMETER attribute cannot be in a THREADPRIVATE directive
20 !$omp threadprivate(i)
22 contains
23 subroutine sub()
24 !ERROR: The procedure name cannot be in a THREADPRIVATE directive
25 !$omp threadprivate(sub)
26 end
27 end