[flang-commits] [flang] [flang][openacc] Allow open acc routines from other modules. (PR #136012)

via flang-commits flang-commits at lists.llvm.org
Tue Apr 29 01:27:55 PDT 2025


================
@@ -5612,6 +5624,10 @@ class FirConverter : public Fortran::lower::AbstractConverter {
     LLVM_DEBUG(llvm::dbgs() << "\n[bridge - startNewFunction]";
                if (auto *sym = scope.symbol()) llvm::dbgs() << " " << *sym;
                llvm::dbgs() << "\n");
+    // I don't think setting the builder is necessary here, because callee
+    // always looks up the FuncOp from the module. If there was a function that
+    // was not declared yet. This call to callee will cause an assertion
+    // failure.
----------------
jeanPerier wrote:

That is correct because `declareFunction` should always be called before calling `lowerFunc`.

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


More information about the flang-commits mailing list