Skip to content

Commit 6442b33

Browse files
[Flang] Move the check inside isEqual
1 parent 595c4f6 commit 6442b33

File tree

1 file changed

+5
-1
lines changed
  • flang/include/flang/Lower/Support

1 file changed

+5
-1
lines changed

flang/include/flang/Lower/Support/Utils.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,16 @@ class IsEqualEvaluateExpr {
572572
}
573573
return true;
574574
}
575+
static bool isEqual(const Fortran::evaluate::SubscriptInteger &x,
576+
const Fortran::evaluate::SubscriptInteger &y) {
577+
return x == y;
578+
}
575579
template <typename A>
576580
static bool isEqual(const Fortran::evaluate::ArrayConstructor<A> &x,
577581
const Fortran::evaluate::ArrayConstructor<A> &y) {
578582
bool checkCharacterType = true;
579583
if constexpr (A::category == Fortran::common::TypeCategory::Character) {
580-
checkCharacterType = x.LEN() == y.LEN();
584+
checkCharacterType = isEqual(*x.LEN(), *y.LEN());
581585
}
582586
using Base = Fortran::evaluate::ArrayConstructorValues<A>;
583587
return isEqual((Base)x, (Base)y) &&

0 commit comments

Comments
 (0)