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

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Fri May 16 07:40:53 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)) {
----------------
tblah wrote:

My worry was whether that would affect many other constructs. Especially through this use:
```c++
void OmpStructureChecker::Enter(const parser::OmpClause &x)
```

Even if it is wrong that those constructs currently do not accept common blocks, it is unlikely that they will all generate correct code in this case.

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


More information about the flang-commits mailing list