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

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Tue May 6 09:17:02 PDT 2025


================
@@ -1034,61 +1034,53 @@ void AccAttributeVisitor::AddRoutineInfoToSymbol(
     Symbol &symbol, const parser::OpenACCRoutineConstruct &x) {
   if (symbol.has<SubprogramDetails>()) {
     Fortran::semantics::OpenACCRoutineInfo info;
+    std::vector<OpenACCRoutineDeviceTypeInfo *> currentDevices;
+    currentDevices.push_back(&info);
     const auto &clauses = std::get<Fortran::parser::AccClauseList>(x.t);
     for (const Fortran::parser::AccClause &clause : clauses.v) {
-      if (std::get_if<Fortran::parser::AccClause::Seq>(&clause.u)) {
-        if (info.deviceTypeInfos().empty()) {
-          info.set_isSeq();
-        } else {
-          info.deviceTypeInfos().back().set_isSeq();
-        }
+      if (const auto *dTypeClause =
----------------
klausler wrote:

Please always use braced initialization throughout Semantics.

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


More information about the flang-commits mailing list