diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td --- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td +++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td @@ -103,12 +103,12 @@ [AttrSizedOperandSegments, NoMemoryEffect]> { let summary = "Represents bounds information for acc data clause."; - let arguments = (ins Optional:$lowerbound, - Optional:$upperbound, - Optional:$extent, - Optional:$stride, + let arguments = (ins Optional:$lowerbound, + Optional:$upperbound, + Optional:$extent, + Optional:$stride, DefaultValuedAttr:$strideInBytes, - Optional:$startIdx); + Optional:$startIdx); let results = (outs OpenACC_DataBoundsType:$result); let assemblyFormat = [{ diff --git a/mlir/test/Dialect/OpenACC/invalid.mlir b/mlir/test/Dialect/OpenACC/invalid.mlir --- a/mlir/test/Dialect/OpenACC/invalid.mlir +++ b/mlir/test/Dialect/OpenACC/invalid.mlir @@ -198,3 +198,10 @@ %value = memref.alloc() : memref<10xf32> // expected-error@+1 {{wait_devnum cannot appear without waitOperands}} acc.enter_data wait_devnum(%cst: index) create(%value : memref<10xf32>) + +// ----- + +%0 = arith.constant 1.0 : f32 +// expected-error@+1 {{operand #0 must be integer or index, but got 'f32'}} +%1 = acc.bounds lowerbound(%0 : f32) +