Skip to content

Commit 14339ab

Browse files
authored
[flang] Catch error on REPEAT(x,NCOPIES=array) (#89993)
The NCOPIES= argument to the intrinsic function REPEAT must be a scalar integer. Fixes #89851.
1 parent 8b512e5 commit 14339ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,9 @@ static const IntrinsicInterface genericIntrinsicFunction[]{
777777
{"identity", SameType, Rank::scalar, Optionality::optional},
778778
{"ordered", AnyLogical, Rank::scalar, Optionality::optional}},
779779
SameType, Rank::scalar, IntrinsicClass::transformationalFunction},
780-
{"repeat", {{"string", SameCharNoLen, Rank::scalar}, {"ncopies", AnyInt}},
780+
{"repeat",
781+
{{"string", SameCharNoLen, Rank::scalar},
782+
{"ncopies", AnyInt, Rank::scalar}},
781783
SameCharNoLen, Rank::scalar, IntrinsicClass::transformationalFunction},
782784
{"reshape",
783785
{{"source", SameType, Rank::array}, {"shape", AnyInt, Rank::shape},

0 commit comments

Comments
 (0)