@@ -1,3 +1,16 @@
+2019-09-17 Julian Brown <julian@codesourcery.com>
+
+ * c-c++-common/goacc/classify-kernels-unparallelized.c: Update expected
+ message/warning/error output.
+ * c-c++-common/goacc/classify-kernels.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose.c: Likewise.
+ * c-c++-common/goacc/note-parallelism-1-kernels-loop-auto.c: Likewise.
+ * c-c++-common/goacc/note-parallelism-combined-kernels-loop-auto.c:
+ Likewise.
+ * c-c++-common/goacc/note-parallelism-kernels-loop-auto.c: Likewise.
+ * c-c++-common/goacc/routine-1.c: Likewise.
+ * c-c++-common/goacc/routine-4-extern.c: Likewise.
+
2019-09-05 Julian Brown <julian@codesourcery.com>
* c-c++-common/goacc/classify-kernels-unparallelized.c,
@@ -19,7 +19,7 @@ extern unsigned int f (unsigned int);
void KERNELS ()
{
#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; i++) /* { dg-message "optimized: beginning .parloops. region in OpenACC .kernels. construct" } */
/* An "extern"al mapping of loop iterations/array indices makes the loop
unparallelizable. */
c[i] = a[f (i)] + b[f (i)];
@@ -16,7 +16,7 @@ extern unsigned int *__restrict c;
void KERNELS ()
{
#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
- for (unsigned int i = 0; i < N; i++)
+ for (unsigned int i = 0; i < N; i++) /* { dg-message "optimized: beginning .parloops. region in OpenACC .kernels. construct" } */
c[i] = a[i] + b[i];
}
@@ -36,30 +36,30 @@ main ()
;
}
-#pragma acc kernels
+#pragma acc kernels /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
for (int i = 0; i < N; i++) /* { dg-message "optimized: beginning .parloops. region in OpenACC .kernels. construct" } */
a[i] = 0;
-#pragma acc kernels loop
+#pragma acc kernels loop /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (int i = 0; i < N; i++)
b[i] = a[N - i - 1];
#pragma acc kernels
{
-#pragma acc loop
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (int i = 0; i < N; i++)
b[i] = a[N - i - 1];
-#pragma acc loop
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (int i = 0; i < N; i++)
c[i] = a[i] * b[i];
a[z] = 0; /* { dg-message "optimized: beginning .gang-single. region in OpenACC .kernels. construct" } */
-#pragma acc loop
+#pragma acc loop /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (int i = 0; i < N; i++)
c[i] += a[i];
@@ -70,7 +70,7 @@ main ()
c[i] += c[i - 1];
}
-#pragma acc kernels
+#pragma acc kernels /* { dg-message "optimized: assigned OpenACC worker vector loop parallelism" } */
{
#pragma acc loop independent /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
/* { dg-message "optimized: parallelized loop nest in OpenACC .kernels. construct" "" { target *-*-* } .-1 } */
@@ -15,68 +15,68 @@ main ()
#pragma acc kernels
/* Strangely indented to keep this similar to other test cases. */
{
-#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto worker /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang worker /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto worker vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang worker vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto gang /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto worker
+#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto vector
+#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (z = 0; z < 10; z++)
;
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
for (y = 0; y < 10; y++)
;
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -85,7 +85,7 @@ main ()
for (z = 0; z < 10; z++)
;
-#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -94,7 +94,7 @@ main ()
for (z = 0; z < 10; z++)
;
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop
@@ -103,7 +103,7 @@ main ()
for (z = 0; z < 10; z++)
;
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -112,7 +112,7 @@ main ()
for (z = 0; z < 10; z++)
;
-#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -27,7 +27,7 @@ main ()
{
int x, y, z;
-#pragma acc kernels /* { dg-warning "region contains gang partitoned code but is not gang partitioned" } */
+#pragma acc kernels /* { dg-warning "region contains gang partitioned code but is not gang partitioned" } */
{
x = 0; /* { dg-message "optimized: beginning .gang-single. region in OpenACC .kernels. construct" } */
y = x < 10;
@@ -16,47 +16,47 @@ main ()
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto gang /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto worker /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto gang vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto gang vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto gang worker /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto gang worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto worker vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto gang worker vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto gang worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
-#pragma acc kernels loop auto gang /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc kernels loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto worker
+#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto vector
+#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (z = 0; z < 10; z++)
;
@@ -13,71 +13,71 @@ main ()
int x, y, z;
#pragma acc kernels
-#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto worker /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang worker /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto worker vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang worker vector /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang worker vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto gang /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto gang /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
-#pragma acc loop auto worker
+#pragma acc loop auto worker /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (y = 0; y < 10; y++)
-#pragma acc loop auto vector
+#pragma acc loop auto vector /* { dg-error ".auto. conflicts with other OpenACC loop specifiers" } */
for (z = 0; z < 10; z++)
;
#pragma acc kernels
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
;
#pragma acc kernels
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -85,7 +85,7 @@ main ()
;
#pragma acc kernels
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -95,7 +95,7 @@ main ()
;
#pragma acc kernels
-#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -105,7 +105,7 @@ main ()
;
#pragma acc kernels
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop
@@ -115,7 +115,7 @@ main ()
;
#pragma acc kernels
-#pragma acc loop auto /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop auto
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -125,7 +125,7 @@ main ()
;
#pragma acc kernels
-#pragma acc loop /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+#pragma acc loop
/* { dg-message "optimized: forwarded loop nest in OpenACC .kernels. construct to .parloops. for analysis" "" { target *-*-* } .-1 } */
for (x = 0; x < 10; x++)
#pragma acc loop auto
@@ -27,7 +27,7 @@ void nohost (void)
int main ()
{
-#pragma acc kernels num_gangs (32) num_workers (32) vector_length (32) /* { dg-warning "region contains gang partitoned code but is not gang partitioned" } */
+#pragma acc kernels num_gangs (32) num_workers (32) vector_length (32) /* { dg-warning "region contains gang partitioned code but is not gang partitioned" } */
{
gang ();
worker ();
@@ -32,7 +32,7 @@ void seq (void)
for (int i = 0; i < 10; i++)
red ++;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang reduction (+:red) // { dg-error "gang reduction on an orphan loop" }
for (int i = 0; i < 10; i++)
red ++;
@@ -58,7 +58,7 @@ void vector (void)
for (int i = 0; i < 10; i++)
red ++;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang reduction (+:red) // { dg-error "gang reduction on an orphan loop" }
for (int i = 0; i < 10; i++)
red ++;
@@ -84,7 +84,7 @@ void worker (void)
for (int i = 0; i < 10; i++)
red ++;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang reduction (+:red) // { dg-error "gang reduction on an orphan loop" }
for (int i = 0; i < 10; i++)
red ++;
@@ -110,7 +110,7 @@ void gang (void)
for (int i = 0; i < 10; i++)
red ++;
-#pragma acc loop gang reduction (+:red)
+#pragma acc loop gang reduction (+:red) /* { dg-error "gang reduction on an orphan loop" } */
for (int i = 0; i < 10; i++)
red ++;