[PATCH] D95449: [flang] Fix problems with constant arrays with lower bounds that are not 1
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 16:42:20 PST 2021
PeteSteinfeld added inline comments.
================
Comment at: flang/test/Evaluate/folding16.f90:6
real, parameter :: b(-1:-1) = log(a)
+integer, parameter :: c(-1:1) = [33, 22, 11]
+integer, parameter :: d(1:3) = [33, 22, 11]
----------------
tskeith wrote:
> I think you should be able to add this line to check the lower bound of `c`:
> `logical, parameter :: test_c = lbound(c, 1) == -1`
>
> But when I tried that it failed. (It's possible I don't understand these folding tests.)
Good catch! This test already has tests that test for the lower bound of arrays where the lower bound was negative, and the test was not reporting failure. It turns out, though, that the test itself was erroneous because the test script only checks for constants that begin with "test_". I will fix the test and the underlying bug.
I checked the other tests in this directory, and folding09.f90 has the same problem. Stay tuned for another change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95449/new/
https://reviews.llvm.org/D95449
More information about the llvm-commits
mailing list