From 4c81a3ed191558414c2a8d395c965329f7600061 Mon Sep 17 00:00:00 2001 From: Slava Zakharin Date: Tue, 14 Nov 2023 16:56:25 -0800 Subject: [PATCH 1/2] [flang][doc] Added remark about array element references in data clauses. --- flang/docs/OpenACC.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flang/docs/OpenACC.md b/flang/docs/OpenACC.md index 4c36a38f8bf57..9be6ee2ff4e78 100644 --- a/flang/docs/OpenACC.md +++ b/flang/docs/OpenACC.md @@ -25,3 +25,10 @@ local: logical expression. * `!$acc routine` directive can be placed at the top level. * `!$acc cache` directive accepts scalar variable. + +## Remarks about incompatibilities with other implementations +* Array element references in the data clauses are equivalent to array sections + consisting of this single element, i.e. `copyin(a[n])` is equivalent to + `copyin(a[n:n])`. Some other implementations have treated it as + `copyin(a[:n])`, which does not correspond to OpenACC spec – Flang does not + support this interpretation of an array element reference. From b9bf891706e99558a962f9e7524fab37879a1bf6 Mon Sep 17 00:00:00 2001 From: Slava Zakharin Date: Tue, 14 Nov 2023 18:58:54 -0800 Subject: [PATCH 2/2] Fixed brackets. --- flang/docs/OpenACC.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flang/docs/OpenACC.md b/flang/docs/OpenACC.md index 9be6ee2ff4e78..61038a9f13df8 100644 --- a/flang/docs/OpenACC.md +++ b/flang/docs/OpenACC.md @@ -28,7 +28,7 @@ local: ## Remarks about incompatibilities with other implementations * Array element references in the data clauses are equivalent to array sections - consisting of this single element, i.e. `copyin(a[n])` is equivalent to - `copyin(a[n:n])`. Some other implementations have treated it as - `copyin(a[:n])`, which does not correspond to OpenACC spec – Flang does not + consisting of this single element, i.e. `copyin(a(n))` is equivalent to + `copyin(a(n:n))`. Some other implementations have treated it as + `copyin(a(:n))`, which does not correspond to OpenACC spec – Flang does not support this interpretation of an array element reference.