diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td --- a/flang/include/flang/Optimizer/Dialect/FIROps.td +++ b/flang/include/flang/Optimizer/Dialect/FIROps.td @@ -1849,16 +1849,17 @@ Optional:$shape, Optional:$slice, Variadic:$indices, - Variadic:$lenParams + Variadic:$typeparams ); let results = (outs fir_ReferenceType); let assemblyFormat = [{ - $memref (`(`$shape^`)`)? (`[`$slice^`]`)? $indices (`typeparams` $lenParams^)? attr-dict `:` functional-type(operands, results) + $memref (`(`$shape^`)`)? (`[`$slice^`]`)? $indices (`typeparams` + $typeparams^)? attr-dict `:` functional-type(operands, results) }]; - let verifier = [{ return ::verify(*this); }]; + let verifier = "return ::verify(*this);"; } def fir_CoordinateOp : fir_Op<"coordinate_of", [NoSideEffect]> { diff --git a/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp b/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp --- a/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp +++ b/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp @@ -222,7 +222,7 @@ } auto xArrCoor = rewriter.create( loc, arrCoor.getType(), arrCoor.memref(), shapeOpers, shiftOpers, - sliceOpers, subcompOpers, arrCoor.indices(), arrCoor.lenParams()); + sliceOpers, subcompOpers, arrCoor.indices(), arrCoor.typeparams()); LLVM_DEBUG(llvm::dbgs() << "rewriting " << arrCoor << " to " << xArrCoor << '\n'); rewriter.replaceOp(arrCoor, xArrCoor.getOperation()->getResults());