diff options
author | PeixinQiao <qiaopeixin@huawei.com> | 2021-10-17 22:05:57 +0800 |
---|---|---|
committer | PeixinQiao <qiaopeixin@huawei.com> | 2021-10-17 22:08:02 +0800 |
commit | dd8c8d4b7cee7cb58b40e0456d656d68a31ef3b4 (patch) | |
tree | c2208c126df862d1048cd098fd052fe7166948f9 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c8be7743acc7e8ea32ba9985c1d57c38f0eab010 (diff) | |
download | llvm-dd8c8d4b7cee7cb58b40e0456d656d68a31ef3b4.zip llvm-dd8c8d4b7cee7cb58b40e0456d656d68a31ef3b4.tar.gz llvm-dd8c8d4b7cee7cb58b40e0456d656d68a31ef3b4.tar.bz2 |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions