Add the missing check on private list information. The
check is the same than the one done for acc.parallel.
Depends on D151146
Reviewed By: razvanlupusoru, jeanPerier
Differential Revision: https://reviews.llvm.org/D151149
}
LogicalResult acc::SerialOp::verify() {
-
+ if (failed(checkSymOperandList<mlir::acc::PrivateRecipeOp>(
+ *this, getPrivatizations(), getGangPrivateOperands(), "private",
+ "privatizations")))
+ return failure();
return checkDataOperands<acc::SerialOp>(*this, getDataClauseOperands());
}
%2 = arith.constant 0 : i32
acc.yield %2 : i32
}
+
+// -----
+
+func.func @fct1(%0 : !llvm.ptr<i32>) -> () {
+ // expected-error@+1 {{expected symbol reference @privatization_i32 to point to a private declaration}}
+ acc.serial private(@privatization_i32 -> %0 : !llvm.ptr<i32>) {
+ }
+ return
+}