[flang-commits] [flang] [flang][OpenMP] Allow flush of common block (PR #139528)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Fri May 16 06:57:28 PDT 2025
================
@@ -2304,13 +2304,6 @@ void OmpStructureChecker::Leave(const parser::OpenMPFlushConstruct &x) {
auto &flushList{std::get<std::optional<parser::OmpArgumentList>>(x.v.t)};
if (flushList) {
- for (const parser::OmpArgument &arg : flushList->v) {
- if (auto *sym{GetArgumentSymbol(arg)}; sym && !IsVariableListItem(*sym)) {
----------------
kiranchandramohan wrote:
I wonder whether the following is the correct fix here.
```
bool OmpStructureChecker::IsVariableListItem(const Symbol &sym) {
- return evaluate::IsVariable(sym) || sym.attrs().test(Attr::POINTER);
+ return evaluate::IsVariable(sym) || sym.attrs().test(Attr::POINTER) ||
+ sym.detailsIf<semantics::CommonBlockDetails>();
}
```
https://github.com/llvm/llvm-project/pull/139528
More information about the flang-commits
mailing list