[PATCH] D84904: [flang] Fixes for RESHAPE()

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 18:14:29 PDT 2020


PeteSteinfeld created this revision.
PeteSteinfeld added reviewers: klausler, tskeith.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
PeteSteinfeld requested review of this revision.

I fixed an assert caused by passing an empty array as the source= argument to
RESHAPE().  In the process, I noticed that there were no tests for RESHAPE(),
so I wrote a test that covers all the description in 16.9.163.  In the process,
I made the error messages more consistent and descriptive.  I also changed the
test to see if a reference to an intrinsic function was a constant to say that
it is a constant if it's a refererence to an invalid intrinsic.  This avoids
emitting multiple messages for the same erroneous source.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84904

Files:
  flang/include/flang/Evaluate/constant.h
  flang/lib/Evaluate/check-expression.cpp
  flang/lib/Evaluate/constant.cpp
  flang/lib/Evaluate/fold-implementation.h
  flang/lib/Evaluate/intrinsics.cpp
  flang/test/Semantics/reshape.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84904.281779.patch
Type: text/x-patch
Size: 7664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200730/f04a3f4a/attachment.bin>


More information about the llvm-commits mailing list