[flang-commits] [flang] [flang] Define CO_REDUCE intrinsic procedure (PR #125115)

Jean-Didier PAILLEUX via flang-commits flang-commits at lists.llvm.org
Mon Feb 3 00:28:54 PST 2025


================
@@ -1450,6 +1450,17 @@ static const IntrinsicInterface intrinsicSubroutine[]{
             {"errmsg", DefaultChar, Rank::scalar, Optionality::optional,
                 common::Intent::InOut}},
         {}, Rank::elemental, IntrinsicClass::collectiveSubroutine},
+    {"co_reduce",
+        {{"a", AnyData, Rank::anyOrAssumedRank, Optionality::required,
----------------
JDPailleux wrote:

Hi, because, according to the standard, A can be a scalar or an array without specifying whether it can be assumed or not. And the definition of A is almost identical to those of `co_min`, `co_max` and so on, without the restriction for the type.

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


More information about the flang-commits mailing list