Skip to content

Commit d93b7e2

Browse files
Fixed the regressions
1 parent 2cef85a commit d93b7e2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

flang/lib/Evaluate/check-expression.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,11 +1609,15 @@ std::optional<bool> ActualArgNeedsCopy(const ActualArgument *actual,
16091609
return false;
16101610
}
16111611
if (maybeContigActual) {
1612+
// We know whether actual arg is contiguous or not
16121613
bool isContiguousActual{maybeContigActual.value()};
1613-
if ((!isContiguousActual || check.HavePolymorphicDifferences()) &&
1614-
check.DummyNeedsContiguity()) {
1615-
return true;
1616-
}
1614+
bool actualArgNeedsCopy{
1615+
(!isContiguousActual || check.HavePolymorphicDifferences()) &&
1616+
check.DummyNeedsContiguity()};
1617+
return actualArgNeedsCopy;
1618+
} else {
1619+
// We don't know whether actual arg is contiguous or not
1620+
return check.DummyNeedsContiguity();
16171621
}
16181622
} else { // Implicit interface
16191623
if (maybeContigActual) {

0 commit comments

Comments
 (0)