[flang-commits] [flang] [flang] Add ETIME runtime and lowering intrinsics implementation (PR #90578)

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Tue Apr 30 10:33:16 PDT 2024


================
@@ -1340,6 +1340,12 @@ static const IntrinsicInterface intrinsicSubroutine[]{
             {"values", AnyInt, Rank::vector, Optionality::optional,
                 common::Intent::Out}},
         {}, Rank::elemental, IntrinsicClass::impureSubroutine},
+    {"etime",
+        {{"values", TypePattern{RealType, KindCode::exactKind, 4}, Rank::vector,
+             Optionality::required, common::Intent::Out},
+            {"time", TypePattern{RealType, KindCode::exactKind, 4},
+                Rank::scalar, Optionality::required, common::Intent::Out}},
+        {}, Rank::elemental, IntrinsicClass::impureSubroutine},
----------------
mjklemm wrote:

That's something that had puzzled me too...  All the intrinsic subroutines do it that way, including `cpu_time` and `date_and_time`.  Not sure why that is, but when I started with this I came across it, too, and it got me wondering.

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


More information about the flang-commits mailing list