From: Tejas Belagod <tejas.belagod@arm.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Tejas Belagod <tejas.belagod@arm.com>,
<richard.sandiford@arm.com>, <jakub@redhat.com>
Subject: [PATCH 09/11] AArch64: Diagnose OpenMP linear clause for SVE type objects.
Date: Mon, 27 May 2024 10:36:24 +0530 [thread overview]
Message-ID: <20240527050626.3769230-10-tejas.belagod@arm.com> (raw)
In-Reply-To: <20240527050626.3769230-1-tejas.belagod@arm.com>
This patch tests if SVE object types if applied to linear clause is diagnosed
as expected.
gcc/testsuite/ChangeLog
* gcc.target/aarch64/sve/omp/linear.c: New test.
---
.../gcc.target/aarch64/sve/omp/linear.c | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/omp/linear.c
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/omp/linear.c b/gcc/testsuite/gcc.target/aarch64/sve/omp/linear.c
new file mode 100644
index 00000000000..77b823a73d4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/omp/linear.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-msve-vector-bits=256 -std=gnu99 -fopenmp -O2 -fdump-tree-ompexp" } */
+
+#include <arm_sve.h>
+
+int a[256];
+
+__attribute__((noinline, noclone)) int
+f1 (svint32_t va, int i)
+{
+ #pragma omp parallel for linear (va: 8) linear (i: 4) /* { dg-error {linear clause applied to non-integral non-pointer variable with type 'svint32_t'} } */
+ for (int j = 16; j < 64; j++)
+ {
+ a[i] = j;
+ i += 4;
+ va = svindex_s32 (0,1);
+ }
+ return i;
+}
+
+__attribute__((noinline, noclone)) int
+f2 (svbool_t p, int i)
+{
+ #pragma omp parallel for linear (p: 0) linear (i: 4) /* { dg-error {linear clause applied to non-integral non-pointer variable with type 'svbool_t'} } */
+ for (int j = 16; j < 64; j++)
+ {
+ a[i] = j;
+ i += 4;
+ p = svptrue_b32 ();
+ }
+ return i;
+}
+
--
2.25.1
next prev parent reply other threads:[~2024-05-27 5:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 5:06 [PATCH 00/11] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs Tejas Belagod
2024-05-27 5:06 ` [PATCH 01/11] OpenMP/PolyInt: Pass poly-int structures by address to OMP libs Tejas Belagod
2024-05-30 12:58 ` Richard Sandiford
2024-05-31 6:30 ` Tejas Belagod
2024-05-31 7:45 ` Richard Sandiford
2024-05-31 8:01 ` Jakub Jelinek
2024-05-31 8:23 ` Richard Sandiford
2024-05-27 5:06 ` [PATCH 02/11] AArch64: Add test cases for SVE types in OpenMP shared clause Tejas Belagod
2024-05-30 12:38 ` Richard Sandiford
2024-05-31 7:01 ` Tejas Belagod
2024-05-27 5:06 ` [PATCH 03/11] AArch64: Diagnose OpenMP offloading when SVE types involved Tejas Belagod
2024-05-30 12:50 ` Richard Sandiford
2024-05-27 5:06 ` [PATCH 04/11] AArch64: Test OpenMP lastprivate clause for various constructs Tejas Belagod
2024-05-27 5:06 ` [PATCH 05/11] AArch64: Test OpenMP threadprivate clause on SVE type Tejas Belagod
2024-05-27 5:06 ` [PATCH 06/11] AArch64: Test OpenMP user-defined reductions with SVE types Tejas Belagod
2024-05-27 5:06 ` [PATCH 07/11] AArch64: Test OpenMP uniform clause on " Tejas Belagod
2024-05-27 5:06 ` [PATCH 08/11] AArch64: Test OpenMP simd aligned clause with " Tejas Belagod
2024-05-27 5:06 ` Tejas Belagod [this message]
2024-05-27 5:06 ` [PATCH 10/11] AArch64: Test OpenMP depend clause and its variations on " Tejas Belagod
2024-05-27 5:06 ` [PATCH 11/11] AArch64: Diagnose SVE type objects when applied to OpenMP doacross clause Tejas Belagod
2024-05-30 12:58 ` [PATCH 00/11] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs Richard Sandiford
2024-06-20 4:46 ` Tejas Belagod
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240527050626.3769230-10-tejas.belagod@arm.com \
--to=tejas.belagod@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).