-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[flang][acc][NFC] Add deviation to the spec that declaring the same variable is permitted #148288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-openacc Author: Susan Tan (ス-ザン タン) (SusanTan) ChangesOpenACC spec says Full diff: https://github.com/llvm/llvm-project/pull/148288.diff 1 Files Affected:
diff --git a/flang/docs/OpenACC.md b/flang/docs/OpenACC.md
index 87f30ccd953b6..cbb2a91f0963b 100644
--- a/flang/docs/OpenACC.md
+++ b/flang/docs/OpenACC.md
@@ -27,6 +27,9 @@ local:
* `!$acc cache` directive accepts scalar variable.
* The `!$acc declare` directive accepts assumed size array arguments for
`deviceptr` and `present` clauses.
+* The OpenACC specification disallows a variable appearing multiple times in
+ clauses of `!$acc declare` directives for a function, subroutine, program,
+ or module, but we allow it with a warning.
## Remarks about incompatibilities with other implementations
* Array element references in the data clauses are equivalent to array sections
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You can add |
flang/docs/OpenACC.md
Outdated
@@ -27,6 +27,9 @@ local: | |||
* `!$acc cache` directive accepts scalar variable. | |||
* The `!$acc declare` directive accepts assumed size array arguments for | |||
`deviceptr` and `present` clauses. | |||
* The OpenACC specification disallows a variable appearing multiple times in | |||
clauses of `!$acc declare` directives for a function, subroutine, program, | |||
or module, but we allow it with a warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change
"but we allow it with a warning" to "but it is allowed with a warning when same clause is used"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
OpenACC spec says
A var may appear at most once in all the clauses of declare directives for a function, subroutine, program, or module.
but our implementation allows it with a warning generated. Add this to the diviation list for record.