[all-commits] [llvm/llvm-project] 7db4c5: [flang] Fix crash in shape analysis of PACK()

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jun 5 19:33:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7db4c583db634ca4f16cd7aadb967dcb209bad5d
      https://github.com/llvm/llvm-project/commit/7db4c583db634ca4f16cd7aadb967dcb209bad5d
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-06-05 (Mon, 05 Jun 2023)

  Changed paths:
    M flang/lib/Evaluate/shape.cpp
    M flang/test/Evaluate/errors01.f90

  Log Message:
  -----------
  [flang] Fix crash in shape analysis of PACK()

A CHECK() was firing when a call to the PACK intrinsic does not have a
VECTOR= argument and at least one dimension of the shape of the ARRAY=
argument could not be determined.  The CHECK was inappropriate, since
this can of course happen, such as when that argument is the result
of the SPREAD() intrinsic with non-constant DIM= or NCOPIES= arguments.
Replace with an if() statement.

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




More information about the All-commits mailing list