Skip to content

Commit d0ca059

Browse files
committed
[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
1 parent 62c187c commit d0ca059

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,11 +1131,11 @@ static const IntrinsicInterface intrinsicSubroutine[]{
11311131
common::Intent::Out}},
11321132
{}, Rank::elemental, IntrinsicClass::impureSubroutine},
11331133
{"system_clock",
1134-
{{"count", SameInt, Rank::scalar, Optionality::optional,
1134+
{{"count", AnyInt, Rank::scalar, Optionality::optional,
11351135
common::Intent::Out},
11361136
{"count_rate", AnyIntOrReal, Rank::scalar, Optionality::optional,
11371137
common::Intent::Out},
1138-
{"count_max", SameInt, Rank::scalar, Optionality::optional,
1138+
{"count_max", AnyInt, Rank::scalar, Optionality::optional,
11391139
common::Intent::Out}},
11401140
{}, Rank::elemental, IntrinsicClass::impureSubroutine},
11411141
};

0 commit comments

Comments
 (0)