[flang-commits] [flang] [flang][acc] Ensure fir.class is handled in type categorization (PR #146174)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Mon Jun 30 13:23:22 PDT 2025
================
@@ -320,8 +320,13 @@ template <>
mlir::acc::VariableTypeCategory
OpenACCMappableModel<fir::BaseBoxType>::getTypeCategory(mlir::Type type,
mlir::Value var) const {
+ // Class-type does not behave like a normal box because it does not hold an
+ // element type. Thus special handle it here.
+ if (mlir::isa<fir::ClassType>(type))
+ return mlir::acc::VariableTypeCategory::composite;
----------------
razvanlupusoru wrote:
Done. I am currently categorizing it as "uncategorized". Although the OpenACC spec does not discuss unlimited polymorphic or assumed type - the language semantics should apply. Namely, the type should be appropriately selected for the categorization to work.
https://github.com/llvm/llvm-project/pull/146174
More information about the flang-commits
mailing list