[all-commits] [llvm/llvm-project] dd8c8d: This patch supports the following checks for THREA...
PeixinQiao via All-commits
all-commits at lists.llvm.org
Sun Oct 17 07:11:34 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd8c8d4b7cee7cb58b40e0456d656d68a31ef3b4
https://github.com/llvm/llvm-project/commit/dd8c8d4b7cee7cb58b40e0456d656d68a31ef3b4
Author: PeixinQiao <qiaopeixin at huawei.com>
Date: 2021-10-17 (Sun, 17 Oct 2021)
Changed paths:
M flang/lib/Semantics/check-omp-structure.cpp
M flang/lib/Semantics/check-omp-structure.h
M flang/test/Semantics/omp-declarative-directive.f90
A flang/test/Semantics/omp-declare-target01.f90
A flang/test/Semantics/omp-declare-target02.f90
A flang/test/Semantics/omp-threadprivate02.f90
Log Message:
-----------
This patch supports the following checks for THREADPRIVATE Directive:
```
[5.1] 2.21.2 THREADPRIVATE Directive
A variable that appears in a threadprivate directive must be declared in
the scope of a module or have the SAVE attribute, either explicitly or
implicitly.
A variable that appears in a threadprivate directive must not be an
element of a common block or appear in an EQUIVALENCE statement.
```
This patch supports the following checks for DECLARE TARGET Directive:
```
[5.1] 2.14.7 Declare Target Directive
A variable that is part of another variable (as an array, structure
element or type parameter inquiry) cannot appear in a declare
target directive.
A variable that appears in a declare target directive must be declared
in the scope of a module or have the SAVE attribute, either explicitly
or implicitly.
A variable that appears in a declare target directive must not be an
element of a common block or appear in an EQUIVALENCE statement.
```
As Fortran 2018 standard [8.5.16] states, a variable, common block, or
procedure pointer declared in the scoping unit of a main program,
module, or submodule implicitly has the SAVE attribute, which may be
confirmed by explicit specification.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D109864
More information about the All-commits
mailing list