[flang-commits] [flang] [flang][OpenMP] Fix common block missing symbol crash (PR #67330)

via flang-commits flang-commits at lists.llvm.org
Thu Oct 5 10:14:22 PDT 2023


================
@@ -588,6 +588,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
         std::nullopt);
   }
 
+  bool isPresentShallowLookup(Fortran::semantics::Symbol &sym) override final {
+    Fortran::lower::SymbolBox sb = shallowLookupSymbol(sym);
+    if (shallowLookupSymbol(sym))
----------------
shraiysh wrote:

Why is this called twice? And shouldn't this function just be 
```
bool isPresentShallowLookup(Fortran::semantics::Symbol &sym) {
  return shallowLookupSymbol(sym)
}
```
And in that case do we need to make this function, or can we directly call this shallowLookup() function at the use site?

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


More information about the flang-commits mailing list