diff --git a/flang/include/flang/Optimizer/Dialect/FIRTypes.td b/flang/include/flang/Optimizer/Dialect/FIRTypes.td --- a/flang/include/flang/Optimizer/Dialect/FIRTypes.td +++ b/flang/include/flang/Optimizer/Dialect/FIRTypes.td @@ -491,8 +491,10 @@ // Does the sequence have unknown shape? (`array<* x T>`) bool hasUnknownShape() const { return getShape().empty(); } - // The value `-1` represents an unknown extent for a dimension - static constexpr Extent getUnknownExtent() { return -1; } + // The value `kDynamicSize` represents an unknown extent for a dimension + static constexpr Extent getUnknownExtent() { + return mlir::ShapedType::kDynamicSize; + } }]; }