This is an archive of the discontinued LLVM Phabricator instance.

[flang] Return true in IsSymplyContiguous for allocatables
ClosedPublic

Authored by jeanPerier on Nov 25 2021, 7:47 AM.

Details

Summary

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.

Diff Detail

Event Timeline

jeanPerier created this revision.Nov 25 2021, 7:47 AM
jeanPerier requested review of this revision.Nov 25 2021, 7:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2021, 7:47 AM
klausler accepted this revision.Nov 26 2021, 10:59 AM
This revision is now accepted and ready to land.Nov 26 2021, 10:59 AM