Skip to content

Commit 65b67cb

Browse files
committed
revert change to needsToMaterialize()
1 parent 54014e4 commit 65b67cb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

flang/lib/Lower/CharacterExpr.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ static fir::CharacterType getCharacterType(const fir::CharBoxValue &box) {
3535
}
3636

3737
static bool needToMaterialize(const fir::CharBoxValue &box) {
38-
auto buffTy = box.getBuffer().getType();
39-
if (auto seqTy = buffTy.dyn_cast<fir::SequenceType>())
40-
if (seqTy.getShape().size() == 1)
41-
buffTy = seqTy.getEleTy();
42-
return buffTy.isa<fir::CharacterType>();
38+
return box.getBuffer().getType().isa<fir::SequenceType>() ||
39+
box.getBuffer().getType().isa<fir::CharacterType>();
4340
}
4441

4542
static std::optional<fir::SequenceType::Extent>

0 commit comments

Comments
 (0)