[flang-commits] [flang] [acc][flang] lowering of acc declare on COMMON variables (PR #163676)
Susan Tan ス-ザン タン via flang-commits
flang-commits at lists.llvm.org
Fri Oct 17 11:37:49 PDT 2025
================
@@ -4312,6 +4354,50 @@ genDeclareInFunction(Fortran::lower::AbstractConverter &converter,
Fortran::lower::StatementContext stmtCtx;
fir::FirOpBuilder &builder = converter.getFirOpBuilder();
+ // Inline helper to emit module-level declare for COMMON symbols in a clause.
+ auto emitCommonGlobal = [&](const Fortran::parser::AccObject &obj,
+ mlir::acc::DataClause clause,
+ auto emitCtorDtor) {
+ Fortran::semantics::Symbol &sym = getSymbolFromAccObject(obj);
+ if (!(sym.detailsIf<Fortran::semantics::CommonBlockDetails>() ||
+ Fortran::semantics::FindCommonBlockContaining(sym)))
+ return;
+
+ std::string globalName = converter.mangleName(sym);
----------------
SusanTan wrote:
Fixed, thanks!
https://github.com/llvm/llvm-project/pull/163676
More information about the flang-commits
mailing list