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

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 14:09:49 PDT 2021


klausler added inline comments.


================
Comment at: flang/lib/Evaluate/intrinsics.cpp:1297
       break;
+    case KindCode::teamType: // TODO: TEAM_TYPE
+      argOk = type->category() == TypeCategory::Derived;
----------------
craig.rasmussen wrote:
> klausler wrote:
> > 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.
> I had found semantics::IsTeamType which worked fine when static libraries are built, however fails when building shared libraries.  Spent too much time trying to figure out a way around the linker but its pretty clear that the design doesn't really allow this because of library build order.  Now just using a simple lookup for symbol name  "__builtin_team_type".  Will submit new patch shortly after more testing,
Please see https://reviews.llvm.org/D110356.


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

https://reviews.llvm.org/D100897



More information about the llvm-commits mailing list