This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Enforce restriction on attach and detach variables
ClosedPublic

Authored by clementval on May 27 2021, 12:51 PM.

Details

Summary

Each var argument to an attach or detach clause must be a
Fortran variable or array with the pointer or allocatable attribute.
This patch enforce this restruction.

Diff Detail

Event Timeline

clementval requested review of this revision.May 27 2021, 12:51 PM
clementval created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2021, 12:51 PM
clementval added projects: Restricted Project, Restricted Project.May 27 2021, 6:26 PM

LGTM. Two nit suggestions/questions.

flang/lib/Semantics/resolve-directives.cpp
866

Nit: Would it be better to say the Argument %s instead of Variable %s since variable again occurs in the message?

874

Nit: Is there a test that hits this path?

This revision is now accepted and ready to land.May 28 2021, 3:13 PM
clementval marked an inline comment as done.

Address review comments

clementval marked an inline comment as done.Jun 1 2021, 11:34 AM
clementval added inline comments.
flang/lib/Semantics/resolve-directives.cpp
866

Right it's nicer to avoid the double occurrences. Thx.

874

Added one.

This revision was landed with ongoing or failed builds.Jun 1 2021, 11:37 AM
This revision was automatically updated to reflect the committed changes.
clementval marked an inline comment as done.