Test '-fopt-info-omp-all' in 'libgomp.oacc-*/kernels-private-vars-*'
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 16 Feb 2022 14:44:27 +0000 (15:44 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 4 Mar 2022 13:47:19 +0000 (14:47 +0100)
libgomp/
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
Test '-fopt-info-omp-all'.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
Likewise.

33 files changed:
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90
libgomp/testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90

index f28513d..acbeb65 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared in a local scope, broadcasting
    to vector-partitioned mode.  Back-to-back worker loops.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,46 +25,47 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-       #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'x' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+       #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'x' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            int x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
 
-       #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'x' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+       #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'x' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            int x = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 21f2511..2558a68 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared in a local scope, broadcasting
    to vector-partitioned mode.  Successive vector loops.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,38 +25,39 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'x' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'x' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            int x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
            
            x = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 8b4cde8..b2a208c 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared in a local scope, broadcasting
    to vector-partitioned mode.  Aggregate worker variable.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 typedef struct
 {
   int x, y;
@@ -22,19 +30,19 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'pt' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'pt' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
@@ -43,18 +51,19 @@ main (int argc, char* argv[])
            pt.x = i ^ j * 3;
            pt.y = i | j * 5;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt.x * k;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt.y * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index a658d16..46c3956 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared in a local scope, broadcasting
    to vector-partitioned mode.  Addressable worker variable.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 typedef struct
 {
   int x, y;
@@ -22,20 +30,20 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'pt' declared in block is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-3 } */
-       /* { dg-note {variable 'ptp' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-4 } */
+        #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'pt' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'ptp' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
@@ -45,20 +53,21 @@ main (int argc, char* argv[])
            
            pt.x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += ptp->x * k;
 
            ptp->y = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt.y * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index b82b9bf..4b5a15e 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared in a local scope, broadcasting
    to vector-partitioned mode.  Array worker variable.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,19 +25,19 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'pt' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'pt' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
@@ -37,20 +45,21 @@ main (int argc, char* argv[])
            
            pt[0] = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt[0] * k;
 
            pt[1] = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt[1] * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 38d89c7..4a82494 100644 (file)
@@ -1,12 +1,20 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
+/* Test of gang-private variables declared on loop directive.  */
 
-#include <assert.h>
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
 
-/* Test of gang-private variables declared on loop directive.  */
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
 
 int
 main (int argc, char* argv[])
@@ -16,17 +24,18 @@ main (int argc, char* argv[])
   for (i = 0; i < 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
   {
-    #pragma acc loop gang(num:32) private(x)
-    /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+    #pragma acc loop gang(num:32) private(x) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
        x = i * 2;
        arr[i] += x;
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     assert (arr[i] == i * 3);
index 62dd12f..039053f 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of gang-private variables declared on loop directive, with broadcasting
    to partitioned workers.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,22 +25,23 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
   {
-    #pragma acc loop gang(num:32) private(x)
-    /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+    #pragma acc loop gang(num:32) private(x) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
        x = i * 2;
 
-       #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+       #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (int j = 0; j < 32; j++)
          arr[i * 32 + j] += x;
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32 * 32; i++)
     assert (arr[i] == i + (i / 32) * 2);
index c22c3b4..2b89659 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of gang-private variables declared on loop directive, with broadcasting
    to partitioned vectors.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,22 +25,23 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
   {
-    #pragma acc loop gang(num:32) private(x)
-    /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+    #pragma acc loop gang(num:32) private(x) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
        x = i * 2;
 
-       #pragma acc loop vector(length:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+       #pragma acc loop vector(length:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (int j = 0; j < 32; j++)
          arr[i * 32 + j] += x;
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32 * 32; i++)
     assert (arr[i] == i + (i / 32) * 2);
index 27a8e80..7076070 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of gang-private addressable variable declared on loop directive, with
    broadcasting to partitioned workers.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,27 +25,28 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
   {
-    #pragma acc loop gang(num:32) private(x)
-    /* { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-1 } */
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-    /* { dg-note {variable 'p' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
-    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-4 } */
+    #pragma acc loop gang(num:32) private(x) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'p' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
         int *p = &x;
 
        x = i * 2;
 
-       #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+       #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (int j = 0; j < 32; j++)
          arr[i * 32 + j] += x;
 
        (*p)--;
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32 * 32; i++)
     assert (arr[i] == i + (i / 32) * 2);
index f570c22..edf0e24 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of gang-private array variable declared on loop directive, with
    broadcasting to partitioned workers.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,23 +25,24 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
   {
-    #pragma acc loop gang(num:32) private(x)
-    /* { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-1 } */
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+    #pragma acc loop gang(num:32) private(x) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
         for (int j = 0; j < 8; j++)
          x[j] = j * 2;
 
-       #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+       #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (int j = 0; j < 32; j++)
          arr[i * 32 + j] += x[j % 8];
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32 * 32; i++)
     assert (arr[i] == i + (i % 8) * 2);
index 5b776f1..a2df33b 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of gang-private aggregate variable declared on loop directive, with
    broadcasting to partitioned workers.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 typedef struct {
   int x, y, z;
   int attr[13];
@@ -23,12 +31,12 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
   {
-    #pragma acc loop gang private(pt)
-    /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+    #pragma acc loop gang private(pt) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+    /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
         pt.x = i;
@@ -36,12 +44,13 @@ main (int argc, char* argv[])
        pt.z = i * 4;
        pt.attr[5] = i * 6;
 
-       #pragma acc loop worker
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+       #pragma acc loop worker /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (int j = 0; j < 32; j++)
          arr[i * 32 + j] += pt.x + pt.y + pt.z + pt.attr[5];
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32 * 32; i++)
     assert (arr[i] == i + (i / 32) * 13);
index 696da0f..51c1de5 100644 (file)
@@ -1,12 +1,20 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
+/* Test of vector-private variables declared on loop directive.  */
 
-#include <assert.h>
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
 
-/* Test of vector-private variables declared on loop directive.  */
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
 
 int
 main (int argc, char* argv[])
@@ -16,34 +24,34 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+        #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
 
-           #pragma acc loop vector(length:32) private(x)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-           /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+           #pragma acc loop vector(length:32) private(x) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
+           /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              {
                x = i ^ j * 3;
                arr[i * 1024 + j * 32 + k] += x * k;
              }
 
-           #pragma acc loop vector(length:32) private(x)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-           /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+           #pragma acc loop vector(length:32) private(x) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
+           /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              {
                x = i | j * 5;
@@ -52,6 +60,7 @@ main (int argc, char* argv[])
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 2e3b635..cb90eaa 100644 (file)
@@ -1,12 +1,20 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
+/* Test of vector-private variables declared on loop directive. Array type.  */
 
-#include <assert.h>
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
 
-/* Test of vector-private variables declared on loop directive. Array type.  */
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
 
 int
 main (int argc, char* argv[])
@@ -16,25 +24,25 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32)
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+        #pragma acc loop worker(num:32) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
 
-           #pragma acc loop vector(length:32) private(pt)
-           /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+           #pragma acc loop vector(length:32) private(pt) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              {
                pt[0] = i ^ j * 3;
@@ -45,6 +53,7 @@ main (int argc, char* argv[])
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 1aedc79..54e1c93 100644 (file)
@@ -1,12 +1,20 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
+/* Test of worker-private variables declared on a loop directive.  */
 
-#include <assert.h>
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
 
-/* Test of worker-private variables declared on a loop directive.  */
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
 
 int
 main (int argc, char* argv[])
@@ -16,18 +24,18 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32) private(x)
-       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
+        #pragma acc loop worker(num:32) private(x) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            x = i ^ j * 3;
@@ -38,6 +46,7 @@ main (int argc, char* argv[])
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32 * 32; i++)
     assert (arr[i] == i + ((i / 32) ^ (i % 32) * 3));
index 3bf62aa..80ac990 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared on a loop directive, broadcasting
    to vector-partitioned mode.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,31 +25,32 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32) private(x)
-       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) private(x) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 8de5516..a05ac60 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared on a loop directive, broadcasting
    to vector-partitioned mode.  Back-to-back worker loops.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,46 +25,47 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32) private(x)
-       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) private(x) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
 
-       #pragma acc loop worker(num:32) private(x)
-       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+       #pragma acc loop worker(num:32) private(x) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            x = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 425fe63..d46bb94 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared on a loop directive, broadcasting
    to vector-partitioned mode.  Successive vector loops.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,38 +25,39 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32) private(x)
-       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) private(x) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
            
            x = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index c027c02..644c617 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared on a loop directive, broadcasting
    to vector-partitioned mode.  Addressable worker variable.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -17,20 +25,20 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32) private(x)
-       /* { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
-       /* { dg-note {variable 'p' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-4 } */
+        #pragma acc loop worker(num:32) private(x) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'p' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
@@ -38,20 +46,21 @@ main (int argc, char* argv[])
            
            x = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
            
            *p = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += x * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 4f17566..182a12a 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared on a loop directive, broadcasting
    to vector-partitioned mode.  Aggregate worker variable.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 typedef struct
 {
   int x, y;
@@ -23,19 +31,19 @@ main (int argc, char* argv[])
   for (i = 0; i < 32 * 32 * 32; i++)
     arr[i] = i;
 
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
-        #pragma acc loop worker(num:32) private(pt)
-       /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) private(pt) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
@@ -43,18 +51,19 @@ main (int argc, char* argv[])
            pt.x = i ^ j * 3;
            pt.y = i | j * 5;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt.x * k;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt.y * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 12b4c54..bdfbb59 100644 (file)
@@ -1,14 +1,22 @@
-/* { dg-additional-options "-fopt-info-note-omp" }
-   { dg-additional-options "--param=openacc-privatization=noisy" }
-   { dg-additional-options "-foffload=-fopt-info-note-omp" }
-   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-   for testing/documenting aspects of that functionality.  */
-
-#include <assert.h>
-
 /* Test of worker-private variables declared on loop directive, broadcasting
    to vector-partitioned mode.  Array worker variable.  */
 
+/* { dg-additional-options "-fopt-info-omp-all" }
+   { dg-additional-options "-foffload=-fopt-info-omp-all" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+   { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } */
+
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
+#include <assert.h>
+
 int
 main (int argc, char* argv[])
 {
@@ -20,40 +28,41 @@ main (int argc, char* argv[])
 
   /* "pt" is treated as "present_or_copy" on the kernels directive because it
      is an array variable.  */
-  #pragma acc kernels copy(arr)
-  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+  #pragma acc kernels copy(arr) /* { dg-line l_compute[incr c_compute] } */
+  /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
   {
     int j;
 
-    #pragma acc loop gang(num:32)
-    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+    #pragma acc loop gang(num:32) /* { dg-line l_loop_i[incr c_loop_i] } */
+    /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
     for (i = 0; i < 32; i++)
       {
         /* But here, it is made private per-worker.  */
-        #pragma acc loop worker(num:32) private(pt)
-       /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
-       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
-       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
+        #pragma acc loop worker(num:32) private(pt) /* { dg-line l_loop_j[incr c_loop_j] } */
+       /* { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+       /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
        for (j = 0; j < 32; j++)
          {
            int k;
            
            pt[0] = i ^ j * 3;
 
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt[0] * k;
 
            pt[1] = i | j * 5;
            
-           #pragma acc loop vector(length:32)
-           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
+           #pragma acc loop vector(length:32) /* { dg-line l_loop_k[incr c_loop_k] } */
+           /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
            for (k = 0; k < 32; k++)
              arr[i * 1024 + j * 32 + k] += pt[1] * k;
          }
       }
   }
+  /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute } */
 
   for (i = 0; i < 32; i++)
     for (int j = 0; j < 32; j++)
index 0ae7c4b..09ab395 100644 (file)
@@ -2,11 +2,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, arr(32)
@@ -15,15 +23,16 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32) private(x)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-  ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) private(x) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
+  ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 1, 32
      x = i * 2;
      arr(i) = arr(i) + x;
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 1, 32
      if (arr(i) .ne. i * 3) stop 1
index e3ff248..bec1069 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, arr(0:32*32)
@@ -16,20 +24,21 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32) private(x)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-  ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) private(x) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
+  ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
      x = i * 2;
 
-     !$acc loop worker(num:32)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+     !$acc loop worker(num:32) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         arr(i * 32 + j) = arr(i * 32 + j) + x;
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 * 32 - 1
      if (arr(i) .ne. i + (i / 32) * 2) stop 1
index 370a25a..9fde012 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, arr(0:32*32)
@@ -16,20 +24,21 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32) private(x)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-  ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) private(x) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
+  ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
      x = i * 2;
 
-     !$acc loop vector(length:32)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+     !$acc loop vector(length:32) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         arr(i * 32 + j) = arr(i * 32 + j) + x;
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 * 32 - 1
      if (arr(i) .ne. i + (i / 32) * 2) stop 1
index abb86d0..02e09b3 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   type vec3
@@ -21,23 +29,24 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32) private(pt)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-  ! { dg-note {variable 'pt' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) private(pt) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
+  ! { dg-note {variable 'pt' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
      pt%x = i
      pt%y = i * 2
      pt%z = i * 4
      pt%attr(5) = i * 6
 
-     !$acc loop vector(length:32)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+     !$acc loop vector(length:32) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         arr(i * 32 + j) = arr(i * 32 + j) + pt%x + pt%y + pt%z + pt%attr(5);
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 * 32 - 1
      if (arr(i) .ne. i + (i / 32) * 13) stop 1
index fe796f3..5811d0c 100644 (file)
@@ -2,11 +2,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, k, idx, arr(0:32*32*32)
@@ -15,23 +23,23 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+     !$acc loop worker(num:8) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
-        !$acc loop vector(length:32) private(x)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-        ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+        !$acc loop vector(length:32) private(x) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
+        ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            x = ieor(i, j * 3)
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
-        !$acc loop vector(length:32) private(x)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-        ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+        !$acc loop vector(length:32) private(x) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
+        ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            x = ior(i, j * 5)
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
@@ -39,6 +47,7 @@ program main
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index b5cefec..81125a2 100644 (file)
@@ -2,11 +2,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: i, j, k, idx, arr(0:32*32*32), pt(2)
@@ -15,16 +23,16 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+     !$acc loop worker(num:8) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
-        !$acc loop vector(length:32) private(x, pt)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-        ! { dg-note {variable 'pt' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 }
+        !$acc loop vector(length:32) private(x, pt) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
+        ! { dg-note {variable 'pt' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            pt(1) = ieor(i, j * 3)
            pt(2) = ior(i, j * 5)
@@ -34,6 +42,7 @@ program main
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index 3fd1239..824c198 100644 (file)
@@ -2,11 +2,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, arr(0:32*32)
@@ -16,19 +24,20 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32) private(x)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) private(x) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(x)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(x) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         x = ieor(i, j * 3)
         arr(i * 32 + j) = arr(i * 32 + j) + x
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 * 32 - 1
      if (arr(i) .ne. i + ieor(i / 32, mod(i, 32) * 3)) stop 1
index 1dc5d9e..d25d419 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, k, idx, arr(0:32*32*32)
@@ -16,24 +24,25 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(x)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(x) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         x = ieor(i, j * 3)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index 25bc67a..7a69145 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, k, idx, arr(0:32*32*32)
@@ -16,37 +24,38 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(x)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(x) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         x = ieor(i, j * 3)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
      end do
 
-     !$acc loop worker(num:8) private(x)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(x) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         x = ior(i, j * 5)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index b3f66ea..2c1d566 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: x, i, j, k, idx, arr(0:32*32*32)
@@ -16,32 +24,33 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(x)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(x) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         x = ieor(i, j * 3)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
 
         x = ior(i, j * 5)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index d9dbb07..4936e56 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: i, j, k, idx, arr(0:32*32*32)
@@ -18,34 +26,35 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(x, p)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 }
-     ! { dg-note {variable 'p' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 }
+     !$acc loop worker(num:8) private(x, p) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'x' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'p' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         p => x
         x = ieor(i, j * 3)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
 
         p = ior(i, j * 5)
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
         end do
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index b4225c2..6b2ec1a 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   type vec2
@@ -21,31 +29,32 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(pt)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(pt) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'pt' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         pt%x = ieor(i, j * 3)
         pt%y = ior(i, j * 5)
         
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + pt%x * k
         end do
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + pt%y * k
         end do
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1
index 76bbda7..a90be1d 100644 (file)
@@ -3,11 +3,19 @@
 
 ! { dg-do run }
 
-! { dg-additional-options "-fopt-info-note-omp" }
+! { dg-additional-options "-fopt-info-omp-all" }
+! { dg-additional-options "-foffload=-fopt-info-omp-all" }
+
 ! { dg-additional-options "--param=openacc-privatization=noisy" }
-! { dg-additional-options "-foffload=-fopt-info-note-omp" }
 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
-! for testing/documenting aspects of that functionality.
+
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
 
 program main
   integer :: i, j, k, idx, arr(0:32*32*32), pt(2)
@@ -16,31 +24,32 @@ program main
      arr(i) = i
   end do
 
-  !$acc kernels copy(arr)
-  !$acc loop gang(num:32)
-  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+  !$acc kernels copy(arr) ! { dg-line l_compute[incr c_compute] }
+  !$acc loop gang(num:32) ! { dg-line l_loop_i[incr c_loop_i] }
+  ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
   do i = 0, 31
-     !$acc loop worker(num:8) private(pt)
-     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
-     ! { dg-note {variable 'pt' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 }
+     !$acc loop worker(num:8) private(pt) ! { dg-line l_loop_j[incr c_loop_j] }
+     ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
+     ! { dg-note {variable 'pt' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop_j$c_loop_j }
      do j = 0, 31
         pt(1) = ieor(i, j * 3)
         pt(2) = ior(i, j * 5)
         
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + pt(1) * k
         end do
 
-        !$acc loop vector(length:32)
-        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
+        !$acc loop vector(length:32) ! { dg-line l_loop_k[incr c_loop_k] }
+        ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
         do k = 0, 31
            arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + pt(2) * k
         end do
      end do
   end do
   !$acc end kernels
+  ! { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_compute$c_compute }
 
   do i = 0, 32 - 1
      do j = 0, 32 -1