[PATCH] D100897: [flang] Make 'team_number()' an intrinsic function
Peter Klausler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 10:21:09 PDT 2021
klausler requested changes to this revision.
klausler added inline comments.
This revision now requires changes to proceed.
================
Comment at: flang/include/flang/Common/default-kinds.h:59
int defaultLogicalKind_{defaultIntegerKind_};
+ int derivedKind_{4};
};
----------------
craig.rasmussen wrote:
> This was a guess.
The kind type parameters of derived types are entirely under the control of the program(mer); there can be an arbitrary number of kind type parameters, including zero, and there are no meaningful defaults apart from what a given type's definition may specify.
================
Comment at: flang/include/flang/Evaluate/type.h:73
return kind == 1 || kind == 2 || kind == 4 || kind == 8;
- default:
- return false;
+ case TypeCategory::Derived:
+ return true;
----------------
Derived types are not intrinsic types; this distinction is their reason for being. Please don't break this predicate.
================
Comment at: flang/lib/Common/default-kinds.cpp:79
return defaultLogicalKind_;
- default:
- CRASH_NO_CASE;
- return 0;
+ case TypeCategory::Derived:
+ return derivedKind_;
----------------
See above. There can be no meaningful default kind that applies to all derived types.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100897/new/
https://reviews.llvm.org/D100897
More information about the llvm-commits
mailing list