[Flang][OpenMP] Add semantic checks for OpenMP Private clause.
authorPraveen G <praveen@compilertree.com>
Mon, 30 Nov 2020 16:35:35 +0000 (11:35 -0500)
committerPraveen G <praveen@compilertree.com>
Mon, 30 Nov 2020 16:46:36 +0000 (11:46 -0500)
commit7a91794d5b261bc87991d5acce9fa503e9a4f269
treed65f101423d574f04df1f6eae7f84ebcdb6261cd
parent1b723a955da04d5a4fc7953c86045b8ef6da2881
[Flang][OpenMP] Add semantic checks for OpenMP Private clause.

Add the semantic checks for the OpenMP 4.5 - 2.15.3.3 Private clause.

1. Pointers with the INTENT(IN) attribute may not appear in a private clause.
2. Variables that appear in namelist statements may not appear in a private clause.
   A flag 'InNamelist' is added to the Symbol::Flag to identify the symbols
   in Namelist statemnts.

Test cases : omp-private01.f90, omp-private02.f90

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D90210
flang/include/flang/Semantics/symbol.h
flang/lib/Semantics/check-omp-structure.cpp
flang/lib/Semantics/check-omp-structure.h
flang/lib/Semantics/resolve-directives.cpp
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/omp-private01.f90 [new file with mode: 0644]
flang/test/Semantics/omp-private02.f90 [new file with mode: 0644]