[all-commits] [llvm/llvm-project] 9d1938: [flang] Return true in IsSymplyContiguous for allo...
jeanPerier via All-commits
all-commits at lists.llvm.org
Sun Nov 28 23:29:29 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9d1938fd1441935313ac0e44e39069bee8171a86
https://github.com/llvm/llvm-project/commit/9d1938fd1441935313ac0e44e39069bee8171a86
Author: Jean Perier <jperier at nvidia.com>
Date: 2021-11-29 (Mon, 29 Nov 2021)
Changed paths:
M flang/lib/Evaluate/check-expression.cpp
M flang/test/Evaluate/folding09.f90
Log Message:
-----------
[flang] Return true in IsSymplyContiguous for allocatables
The current code was relying on the fact that allocatables are deferred
shape and that isAssumedShape() should therefore return true for them.
This is not true, because the current parsing/semantic analysis always
builds a semantics::ArraySpec for `x(:)` that returns true to both
isDeferredShape()/isAssumedShape(), whether x is allocatable/pointer or
not.
It proved tricky to change this behavior, so this is a simple fix for
IsSymplyContiguous where it currently matters, but we most likely want
to investigate more and fix the isDeferredShape()/isAssumedShape() in
a second time.
Differential Revision: https://reviews.llvm.org/D114599
More information about the All-commits
mailing list