Add 'c-c++-common/goacc/kernels-decompose-pr104086-1.c' [PR104086]
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 18 Jan 2022 16:22:14 +0000 (17:22 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Sat, 12 Mar 2022 11:58:48 +0000 (12:58 +0100)
..., currently XFAILed with 'dg-ice', as it runs into
'gcc/omp-low.cc:lower_omp_target':

    13125 else if (is_gimple_reg (var))
    13126   {
    13127     gcc_assert (offloaded);

This means, the recent PR100280 etc. changes are still not sufficient.

gcc/testsuite/
PR middle-end/104086
* c-c++-common/goacc/kernels-decompose-pr104086-1.c: New file.

gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr104086-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr104086-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr104086-1.c
new file mode 100644 (file)
index 0000000..eab10cf
--- /dev/null
@@ -0,0 +1,25 @@
+/* Reduced from 'libgomp.oacc-c-c++-common/declare-vla.c'.  */
+
+/* { dg-additional-options "-fchecking" }
+   { dg-ice TODO }
+   { dg-prune-output {during GIMPLE pass: omplower} } */
+
+/* { dg-additional-options "--param openacc-kernels=decompose" } */
+
+/* { dg-additional-options "-fopt-info-all-omp" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" } */
+
+void
+foo (void)
+{
+#pragma acc data /* { dg-line l_data1 } */
+  /* { dg-bogus {note: variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {TODO 'data'} { xfail *-*-* } l_data1 } */
+  {
+    int i;
+
+#pragma acc kernels
+    /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+    i = 0;
+  }
+}