[flang-commits] [flang] [flang][OpenMP] Allow flush of common block (PR #139528)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Wed May 14 10:05:11 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:

@kparzysz is this an issue with the function `IsVariableListItem`?
```
A variable list item is one of the following:
2 • a variable that is not coindexed and that is not a substring;
3 • an array section that is not coindexed and that does not contain an element that is a substring;
4 • a named constant;
5 • an associate name that may appear in a variable definition context; or
6 • a common block name (enclosed in slashes).
```

https://github.com/llvm/llvm-project/pull/139528


More information about the flang-commits mailing list