[flang-commits] [flang] [flang] Add parsing of DO CONCURRENT REDUCE clause (PR #92518)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Fri May 17 10:15:33 PDT 2024


================
@@ -2236,16 +2243,29 @@ struct ConcurrentHeader {
       t;
 };
 
+// F'2023 R1131 reduce-operation ->
+//                + | * | .AND. | .OR. | .EQV. | .NEQV. |
+//                MAX | MIN | IAND | IOR | IEOR
+struct ReduceOperation {
+  UNION_CLASS_BOILERPLATE(ReduceOperation);
+  std::variant<DefinedOperator, ProcedureDesignator> u;
----------------
klausler wrote:

Neither of the types in this variant are appropriate for representing a reduction operator.  Use an `ENUM_CLASS` or (better) reuse the reduction operators already present for OpenACC reductions or `!$CUF KERNEL DO REDUCE()` reductions.

https://github.com/llvm/llvm-project/pull/92518


More information about the flang-commits mailing list