[flang-commits] [flang] d0ca059 - [flang] Fix crash on "call system_clock(count_max=j)"
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Fri Oct 29 10:51:36 PDT 2021
Author: peter klausler
Date: 2021-10-29T10:51:28-07:00
New Revision: d0ca0595b9bdb66ed28a8e33283d0244575b4ebb
URL: https://github.com/llvm/llvm-project/commit/d0ca0595b9bdb66ed28a8e33283d0244575b4ebb
DIFF: https://github.com/llvm/llvm-project/commit/d0ca0595b9bdb66ed28a8e33283d0244575b4ebb.diff
LOG: [flang] Fix crash on "call system_clock(count_max=j)"
An erroneous entry in the intrinsics table causes semantics to
crash on a call to system_clock if the optional "count_max="
argument appears and "count=" does not.
Differential Revision: https://reviews.llvm.org/D112738
Added:
Modified:
flang/lib/Evaluate/intrinsics.cpp
Removed:
################################################################################
diff --git a/flang/lib/Evaluate/intrinsics.cpp b/flang/lib/Evaluate/intrinsics.cpp
index 20be19e5f109a..bd17fd6aae821 100644
--- a/flang/lib/Evaluate/intrinsics.cpp
+++ b/flang/lib/Evaluate/intrinsics.cpp
@@ -1131,11 +1131,11 @@ static const IntrinsicInterface intrinsicSubroutine[]{
common::Intent::Out}},
{}, Rank::elemental, IntrinsicClass::impureSubroutine},
{"system_clock",
- {{"count", SameInt, Rank::scalar, Optionality::optional,
+ {{"count", AnyInt, Rank::scalar, Optionality::optional,
common::Intent::Out},
{"count_rate", AnyIntOrReal, Rank::scalar, Optionality::optional,
common::Intent::Out},
- {"count_max", SameInt, Rank::scalar, Optionality::optional,
+ {"count_max", AnyInt, Rank::scalar, Optionality::optional,
common::Intent::Out}},
{}, Rank::elemental, IntrinsicClass::impureSubroutine},
};
More information about the flang-commits
mailing list