[flang][OpenMP] Fix resolve common block in data-sharing clauses
authorPeixin Qiao <qiaopeixin@huawei.com>
Sun, 2 Oct 2022 02:38:27 +0000 (10:38 +0800)
committerPeixin Qiao <qiaopeixin@huawei.com>
Sun, 2 Oct 2022 02:38:27 +0000 (10:38 +0800)
commit4e43a14bdbe1d3ae57701aa6d280fef46a6ea14b
tree1788e5fb818474ad7ca977b9166312a88b5fb80d
parentd11e406e369fc90be5e2e2a0798ea7b7d2625882
[flang][OpenMP] Fix resolve common block in data-sharing clauses

The previous resolve only creates the host associated varaibles for
common block members, but does not replace the original objects with
the new created ones. Fix it and also compute the sizes and offsets
for the host common block members if they are host associated.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D127214
flang/include/flang/Semantics/symbol.h
flang/lib/Semantics/compute-offsets.cpp
flang/lib/Semantics/resolve-directives.cpp
flang/test/Semantics/OpenMP/omp-common-block.f90 [new file with mode: 0644]
flang/test/Semantics/OpenMP/omp-threadprivate04.f90