Skip to content

Commit

Permalink
[flang] Add TODO instead of crashing on assert
Browse files Browse the repository at this point in the history
Current code are crashing on the assert `assert(seqTy && "must be an array");`.

Add a TODO instead until the support is in.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D144173
  • Loading branch information
clementval committed Feb 16, 2023
1 parent 83014d8 commit e97fc50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flang/lib/Lower/ConvertExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4305,11 +4305,13 @@ class ArrayExprLowering {
fir::ArrayLoadOp
createAndLoadSomeArrayTemp(mlir::Type type,
llvm::ArrayRef<mlir::Value> shape) {
mlir::Location loc = getLoc();
if (fir::isPolymorphicType(type))
TODO(loc, "polymorphic array temporary");
if (ccLoadDest)
return (*ccLoadDest)(shape);
auto seqTy = type.dyn_cast<fir::SequenceType>();
assert(seqTy && "must be an array");
mlir::Location loc = getLoc();
// TODO: Need to thread the LEN parameters here. For character, they may
// differ from the operands length (e.g concatenation). So the array loads
// type parameters are not enough.
Expand Down

0 comments on commit e97fc50

Please sign in to comment.