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 @@ -492,7 +492,7 @@ bool hasUnknownShape() const { return getShape().empty(); } // The value `-1` represents an unknown extent for a dimension - static constexpr Extent getUnknownExtent() { return -1; } + static constexpr Extent getUnknownExtent() { return ShapedType::kDynamicSize; } }]; }