[flang] Accept INDEX(..., BACK=array)

The intrinsic table entry for INDEX mistakenly required
the optional BACK= argument to be scalar, but it's an
elemental intrinsic that can accept a conforming array.

Differential Revision: https://reviews.llvm.org/D117700
This commit is contained in:
Peter Klausler 2022-01-11 11:24:55 -08:00
parent bddfb81a31
commit 78649a8499
2 changed files with 1 additions and 1 deletions

View file

@ -486,7 +486,7 @@ static const IntrinsicInterface genericIntrinsicFunction[]{
{"image_status", {{"image", SameInt}, OptionalTEAM}, DefaultInt},
{"index",
{{"string", SameChar}, {"substring", SameChar},
{"back", AnyLogical, Rank::scalar, Optionality::optional},
{"back", AnyLogical, Rank::elemental, Optionality::optional},
DefaultingKIND},
KINDInt},
{"int", {{"a", AnyNumeric, Rank::elementalOrBOZ}, DefaultingKIND}, KINDInt},

Binary file not shown.