[flang-commits] [flang] [flang][acc] Fix cache directive with mapped component (PR #179335)
via flang-commits
flang-commits at lists.llvm.org
Tue Feb 3 00:59:58 PST 2026
================
@@ -4304,20 +4304,26 @@ genACC(Fortran::lower::AbstractConverter &converter,
fir::substBase(hostExv, cacheOp.getAccVar());
converter.bindSymbol(symbol, cacheExv);
} else {
- // Must be a derived type component reference.
+ // Derived type component reference.
assert(designator && "expected designator for non-symbol cache operand");
std::optional<Fortran::evaluate::Component> componentRef =
extractComponentFromDesignator(designator);
assert(componentRef &&
"expected component reference for derived type cache operand");
- // Component references are lowered to designate operations.
- auto designate = base.getDefiningOp<hlfir::DesignateOp>();
- assert(designate && "expected designate op for component reference");
+ // When component is mapped via copyin, base is the mapped address.
----------------
jeanPerier wrote:
Should the comment be a bit more generic and talk about a data directives instead of copyin specifically?
https://github.com/llvm/llvm-project/pull/179335
More information about the flang-commits
mailing list