Index: mlir/lib/Dialect/StandardOps/Ops.cpp =================================================================== --- mlir/lib/Dialect/StandardOps/Ops.cpp +++ mlir/lib/Dialect/StandardOps/Ops.cpp @@ -2513,6 +2513,7 @@ auto newMemRefType = MemRefType::get(newShapeConstants, memrefType.getElementType(), {map}, memrefType.getMemorySpace()); + (void)dynamicOffsetOperandCount; // unused in opt mode assert(static_cast(newOperands.size()) == dynamicOffsetOperandCount + newMemRefType.getNumDynamicDims());