Skip to content

Commit f572da2

Browse files
Tweaked the change to ignore assumed type in polymorphic check
1 parent 9189ede commit f572da2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Evaluate/check-expression.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,9 +1502,9 @@ class CopyInOutExplicitInterface {
15021502
return false;
15031503
}
15041504
auto actualType{characteristics::TypeAndShape::Characterize(actual_, fc_)};
1505-
bool actualIsPolymorphic{
1506-
actualType && actualType->type().IsPolymorphic()};
1507-
if (actualIsPolymorphic && !dummyObj_.IsPassedByDescriptor(/*isBindC*/false)) {
1505+
if (actualType && actualType->type().IsPolymorphic() &&
1506+
!actualType->type().IsAssumedType() &&
1507+
!dummyObj_.IsPassedByDescriptor(/*isBindC*/false)) {
15081508
// Not passing a descriptor, so will need to make a copy of the data
15091509
// with a proper type.
15101510
return true;

0 commit comments

Comments
 (0)