[flang-commits] [PATCH] D123712: [flang] Fix shape analysis of RESHAPE result
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Apr 13 12:37:12 PDT 2022
klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.
Shape analysis of RESHAPE(..., SHAPE=s) should of course return
the SHAPE= actual argument when it is constant; but when it is
not, its length is still known, and thus so is the rank of the
result of RESHAPE(), and shape analysis should at least return
a shape vector of the right length rather than a result that
makes the result appear to be a scalar, which can lead to some
bogus error messages.
Also, while here: rename a private GetShapeHelper::AsShape()
routine so that it can't be confused with the ones in the API
of shape.h.
https://reviews.llvm.org/D123712
Files:
flang/include/flang/Evaluate/shape.h
flang/lib/Evaluate/intrinsics.cpp
flang/lib/Evaluate/shape.cpp
flang/test/Semantics/call03.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123712.422603.patch
Type: text/x-patch
Size: 4491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220413/cd353115/attachment.bin>
More information about the flang-commits
mailing list