[flang-commits] [flang] [Flang][OpenMP] Fix for error in atomic read for different elements of the common symbol #80399 (PR #109265)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Sep 19 04:35:38 PDT 2024


================
@@ -1796,13 +1796,30 @@ inline void OmpStructureChecker::ErrIfLHSAndRHSSymbolsMatch(
   const auto *e{GetExpr(context_, expr)};
   const auto *v{GetExpr(context_, var)};
   if (e && v) {
-    auto vSyms{evaluate::GetSymbolVector(*v)};
-    const Symbol &varSymbol = vSyms.front();
+    const Symbol &varSymbol = evaluate::GetSymbolVector(*v).front();
----------------
kiranchandramohan wrote:

We have some issues with using the front symbol of the SymbolVector in https://github.com/llvm/llvm-project/pull/108516#pullrequestreview-2312990978. Could you check whether it is OK here?

Some of the other comments in https://github.com/llvm/llvm-project/pull/108516 apply here as well regarding `ToString()` not required in the error messages.

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


More information about the flang-commits mailing list