[flang-commits] [PATCH] D117700: [flang] Accept INDEX(..., BACK=array)
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Jan 19 10:15:40 PST 2022
klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added subscribers: jdoerfert, arphaman.
klausler requested review of this revision.
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.
https://reviews.llvm.org/D117700
Files:
flang/lib/Evaluate/intrinsics.cpp
flang/test/Evaluate/folding05.f90
Index: flang/lib/Evaluate/intrinsics.cpp
===================================================================
--- flang/lib/Evaluate/intrinsics.cpp
+++ flang/lib/Evaluate/intrinsics.cpp
@@ -486,7 +486,7 @@
{"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},
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117700.401319.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220119/8b0f06f2/attachment.bin>
More information about the flang-commits
mailing list