[flang-commits] [flang] [flang] Fixed regression in copy-in/copy-out (PR #161259)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Mon Sep 29 11:52:19 PDT 2025
================
@@ -1493,36 +1493,6 @@ class CopyInOutExplicitInterface {
return !actualTreatAsContiguous && dummyNeedsContiguity;
}
- // Returns true, if actual and dummy have polymorphic differences
- bool HavePolymorphicDifferences() const {
- bool dummyIsAssumedRank{dummyObj_.type.attrs().test(
- characteristics::TypeAndShape::Attr::AssumedRank)};
- bool actualIsAssumedRank{semantics::IsAssumedRank(actual_)};
- bool dummyIsAssumedShape{dummyObj_.type.attrs().test(
- characteristics::TypeAndShape::Attr::AssumedShape)};
- bool actualIsAssumedShape{semantics::IsAssumedShape(actual_)};
- if ((actualIsAssumedRank && dummyIsAssumedRank) ||
- (actualIsAssumedShape && dummyIsAssumedShape)) {
- // Assumed-rank and assumed-shape arrays are represented by descriptors,
- // so don't need to do polymorphic check.
- } else if (!dummyObj_.ignoreTKR.test(common::IgnoreTKR::Type)) {
- // flang supports limited cases of passing polymorphic to non-polimorphic.
----------------
eugeneepshteyn wrote:
Temporary is not required: a descriptor is built that slices off the child type and allows direct updates of parent.
https://github.com/llvm/llvm-project/pull/161259
More information about the flang-commits
mailing list