[all-commits] [llvm/llvm-project] 2cf525: [flang] Fixes for RESHAPE()

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Thu Jul 30 19:06:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cf52504bb076d24c23f161e92340828052b69f7
      https://github.com/llvm/llvm-project/commit/2cf52504bb076d24c23f161e92340828052b69f7
  Author: Peter Steinfeld <psteinfeld at nvidia.com>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

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

  Log Message:
  -----------
  [flang] Fixes for RESHAPE()

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.

Differential Revision: https://reviews.llvm.org/D84904




More information about the All-commits mailing list