[flang] Fold IS_CONTIGUOUS() to .FALSE. when it is known to be
authorPeter Klausler <pklausler@nvidia.com>
Wed, 21 Sep 2022 19:18:15 +0000 (12:18 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 23 Sep 2022 21:16:26 +0000 (14:16 -0700)
commit94896994386d2a6a9e7bc310de83ee1491f194ef
tree3e0ae02d379cacdbdb55fd72147a4c2bce24deb7
parent90a5d8499a781c927f7e941aaa20b5b09f92fa4d
[flang] Fold IS_CONTIGUOUS() to .FALSE. when it is known to be

At present, IS_CONTIGUOUS() can only either fold to .TRUE. or
remain unknown.  The underlying analysis, however, is capable
of returning a tri-state result (true, false, or unknown).
Extend and expose it to folding so that IS_CONTIGUOUS() can
fold to .FALSE. as well as to .TRUE. when contiguity is
known.

Differential Revision: https://reviews.llvm.org/D134466
flang/include/flang/Evaluate/check-expression.h
flang/include/flang/Evaluate/variable.h
flang/lib/Evaluate/check-expression.cpp
flang/lib/Evaluate/fold-logical.cpp
flang/lib/Evaluate/variable.cpp
flang/test/Semantics/assign03.f90