[all-commits] [llvm/llvm-project] 9f8ee6: [flang] Warn on overflow folding DIM()

Peter Klausler via All-commits all-commits at lists.llvm.org
Sun Feb 12 17:23:38 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f8ee610beb18930e2ad8461cf5105bcdb5a4fec
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-02-12 (Sun, 12 Feb 2023)

  Changed paths:
    M flang/include/flang/Evaluate/integer.h
    M flang/lib/Evaluate/fold-integer.cpp
    M flang/lib/Evaluate/fold-real.cpp
    M flang/test/Evaluate/errors01.f90

  Log Message:
  [flang] Warn on overflow folding DIM()

The intrinsic function DIM can overflow when its second argument
is negative.  Detect this case for real and integer arguments and
emit a warning when necessary.

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

More information about the All-commits mailing list