This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix creation of deferred shape arrays by POINTER statement
ClosedPublic

Authored by PeteSteinfeld on Jan 20 2021, 12:41 PM.

Details

Summary

It's possible to declare deferred shape array using the POINTER
statement, for example:

POINTER :: var(:)

When analyzing POINTER declarations, we were not capturing the array
specification information, if present. I fixed this by changing the
"Post" function for "parser::PointerDecl" to check to see if the
declaration contained a "DeferredShapeSpecList". In such cases, I
analyzed the shape and used to information to declare an "ObjectEntity"
that contains the shape information rather than an "UnknownEntity".

I also added a couple of small tests that fail to compile without these
changes.

Diff Detail

Event Timeline

PeteSteinfeld requested review of this revision.Jan 20 2021, 12:41 PM
PeteSteinfeld created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2021, 12:41 PM
PeteSteinfeld added a project: Restricted Project.Jan 20 2021, 12:42 PM
klausler accepted this revision.Jan 20 2021, 12:52 PM
This revision is now accepted and ready to land.Jan 20 2021, 12:52 PM
This revision was landed with ongoing or failed builds.Jan 20 2021, 1:14 PM
This revision was automatically updated to reflect the committed changes.
MaskRay added a subscriber: MaskRay.EditedJan 26 2021, 9:22 AM

In your commit the message does not include Reviewed by:. Many people agree that both Reviewed by: & Differential Revision: should be present. The Reviewed by: list indicates people who acknowledged the patch. (The Reviewers: list does not necessarily mean all the people on the list have acknowledged the patch so Reviewers: is mostly useless.)

arc amend can fetch the Phabricator summary and amend the local description.

You can install llvm/utils/git/pre-push.py to prevent accidental Summary:, Reviewers:, Subscribers: and Tags: in the presence of Differential Revision:.

In your commit the message does not include Reviewed by:. Many people agree that both Reviewed by: & Differential Revision: should be present. The Reviewed by: list indicates people who acknowledged the patch. (The Reviewers: list does not necessarily mean all the people on the list have acknowledged the patch so Reviewers: is mostly useless.)

arc amend can fetch the Phabricator summary and amend the local description.

You can install llvm/utils/git/pre-push.py to prevent accidental Summary:, Reviewers:, Subscribers: and Tags: in the presence of Differential Revision:.

Thanks for watching over these revisions. From what I can tell, the "arc diff" command adds a line to the commit message that contains a link to the Differential Revision. Here's an excerpt from the commit message from a more recent update of mine that "arc diff" added:

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

The Differential Revision, in turn, contains information about who reviewed and approved the change. So it seems to me that adding that information to the commit message is redundant.