[PATCH] D100897: [flang] Make 'team_number()' an intrinsic function

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 08:37:56 PDT 2021


klausler added inline comments.


================
Comment at: flang/lib/Evaluate/intrinsics.cpp:236
     Rank::conformable, Optionality::optional, common::Intent::In};
+// Would rather use OptionalTEAM in team_number() rather than RequiredTEAM
+// static constexpr IntrinsicDummyArgument OptionalTEAM{"team", TEAM_TYPE,
----------------
Why not use it?


================
Comment at: flang/lib/Evaluate/intrinsics.cpp:1297
       break;
+    case KindCode::teamType: // TODO: TEAM_TYPE
+      argOk = type->category() == TypeCategory::Derived;
----------------
craig.rasmussen wrote:
> It seems like more work is required here because argOk==true should only occur if the derived type is type(team_type), right? Can derived types have kinds (I suppose I should know that)?
> 
> In any case, once TEAM_TYPE is sorted out I can finish a lot more of coarray intrinsic functions.
> 
> 
Right, you need to check that the derived type is TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV.  Grep the sources and you'll find a utility predicate that should help.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100897/new/

https://reviews.llvm.org/D100897



More information about the llvm-commits mailing list