public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7476] Add 'c-c++-common/goacc/kernels-decompose-pr104132-1.c' [PR104132]
@ 2022-03-04 13:25 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-03-04 13:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:741859b390c042755e9379f8061a157e5af378b6

commit r12-7476-g741859b390c042755e9379f8061a157e5af378b6
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Wed Jan 19 22:28:55 2022 +0100

    Add 'c-c++-common/goacc/kernels-decompose-pr104132-1.c' [PR104132]
    
    ..., currently XFAILed with 'dg-ice'.
    
            PR middle-end/104132
            gcc/testsuite/
            * c-c++-common/goacc/kernels-decompose-pr104132-1.c: New file.

Diff:
---
 .../goacc/kernels-decompose-pr104132-1.c           | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr104132-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr104132-1.c
new file mode 100644
index 00000000000..4fbfdd81e15
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr104132-1.c
@@ -0,0 +1,38 @@
+/* { dg-additional-options "--param openacc-kernels=decompose" } */
+
+/* { dg-additional-options "-fchecking" }
+   { dg-ice TODO }
+   { dg-prune-output {k = 0 \+ \.offset\.[0-9]+;} }
+   { dg-prune-output {k = 0 \+ 2;} }
+   { dg-prune-output {during IPA pass: \*free_lang_data} } */
+
+/* { dg-additional-options "-fopt-info-all-omp" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
+   { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } */
+
+int arr_0;
+
+void
+foo (void)
+{
+#pragma acc kernels /* { dg-line l_compute1 } */
+  /* { dg-note {variable 'k' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_compute1 } */
+  {
+    int k;
+
+    /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } .+1 } */
+#pragma acc loop /* { dg-line l_loop_k1 } */
+    /* { dg-note {variable 'k' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_k1 } */
+    for (k = 0; k < 2; k++)
+      arr_0 = k;
+
+    /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } .+1 } */
+#pragma acc loop /* { dg-line l_loop_k2 } */
+    /* { dg-note {variable 'k' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_k2 } */
+    for (k = 0; k < 2; k++)
+      arr_0 = k;
+  }
+}
+/* { dg-bogus {error: non-register as LHS of binary operation} {} { xfail *-*-* } .-1 } */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-04 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 13:25 [gcc r12-7476] Add 'c-c++-common/goacc/kernels-decompose-pr104132-1.c' [PR104132] Thomas Schwinge

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).