[flang-commits] [PATCH] D112738: [flang] Fix crash on "call system_clock(count_max=j)"
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Oct 28 11:09:03 PDT 2021
klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
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.
https://reviews.llvm.org/D112738
Files:
flang/lib/Evaluate/intrinsics.cpp
Index: flang/lib/Evaluate/intrinsics.cpp
===================================================================
--- flang/lib/Evaluate/intrinsics.cpp
+++ flang/lib/Evaluate/intrinsics.cpp
@@ -1131,11 +1131,11 @@
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},
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112738.383090.patch
Type: text/x-patch
Size: 875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211028/b7a7bbcb/attachment.bin>
More information about the flang-commits
mailing list