[all-commits] [llvm/llvm-project] 2018da: [flang] Fix calls to LBOUND() intrinsic for arrays...

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Wed Feb 3 10:54:24 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2018dafce50cbd1363fdd4e24c76e98852843a19
      https://github.com/llvm/llvm-project/commit/2018dafce50cbd1363fdd4e24c76e98852843a19
  Author: Peter Steinfeld <psteinfeld at nvidia.com>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M flang/lib/Evaluate/fold-integer.cpp
    M flang/test/Evaluate/folding16.f90

  Log Message:
  -----------
  [flang] Fix calls to LBOUND() intrinsic for arrays with lower bounds not 1

Constant folding for calls to LBOUND() was not working when the lower bound of
a constant array was not 1.

I fixed this and re-enabled the test in Evaluate/folding16.f90 that previously
was silently failing.  I slightly changed the test to parenthesize the first
argument to exercise all of the new code.

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




More information about the All-commits mailing list