diff --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp --- a/flang/lib/Lower/OpenACC.cpp +++ b/flang/lib/Lower/OpenACC.cpp @@ -660,6 +660,9 @@ builder.getIntegerAttr(ty, getReductionInitValue(op, ty))); if (op == mlir::acc::ReductionOperator::AccMin || op == mlir::acc::ReductionOperator::AccMax) { + if (mlir::isa(ty)) + llvm::report_fatal_error( + "min/max reduction not supported for complex type"); if (auto floatTy = mlir::dyn_cast_or_null(ty)) return builder.create( loc, ty,