Skip to content

Commit cbf4abf

Browse files
committed
wip
1 parent b4d52a9 commit cbf4abf

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,16 +2032,16 @@ std::optional<SpecificCall> IntrinsicInterface::Match(
20322032
dimArg = j;
20332033
argOk = true;
20342034
break;
2035-
case KindCode::same: {
2035+
case KindCode::same:
20362036
if (!sameArg) {
20372037
sameArg = arg;
2038+
argOk = true;
2039+
} else {
2040+
auto sameType{sameArg->GetType().value()};
2041+
argOk = sameType.IsTkLenCompatibleWith(*type) ||
2042+
(name == "move_alloc"s && type->IsTkLenCompatibleWith(sameType));
20382043
}
2039-
// Check both ways so that a CLASS(*) actuals to
2040-
// MOVE_ALLOC and EOSHIFT both work.
2041-
auto sameType{sameArg->GetType().value()};
2042-
argOk = sameType.IsTkLenCompatibleWith(*type) ||
2043-
type->IsTkLenCompatibleWith(sameType);
2044-
} break;
2044+
break;
20452045
case KindCode::sameKind:
20462046
if (!sameArg) {
20472047
sameArg = arg;

flang/lib/Semantics/resolve-names.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9737,7 +9737,7 @@ void ResolveNamesVisitor::ResolveSpecificationParts(ProgramTree &node) {
97379737
},
97389738
node.stmt());
97399739
Walk(node.spec());
9740-
bool inDeviceSubprogram = false;
9740+
bool inDeviceSubprogram{false};
97419741
// If this is a function, convert result to an object. This is to prevent the
97429742
// result from being converted later to a function symbol if it is called
97439743
// inside the function.

0 commit comments

Comments
 (0)