+2015-10-29 Thomas Schwinge <thomas@codesourcery.com>
+ Cesar Philippidis <cesar@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: Rename to...
+ * testsuite/libgomp.oacc-c-c++-common/combined-directives-1.c:
+ ... this. Add a description of the test at the top of the file.
+ * testsuite/libgomp.oacc-fortran/combdir-1.f90: Rename file to...
+ * testsuite/libgomp.oacc-fortran/combined-directives-1.f90:
+ ... this. Add a description of the test at the top of the file.
+
2015-10-28 Nathan Sidwell <nathan@codesourcery.com>
* testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: New.
+++ /dev/null
-/* { dg-do run } */
-
-#include <stdlib.h>
-
-int
-main (int argc, char **argv)
-{
- const int N = 32;
- float a[N], b[N];
- int i;
-
- for (i = 0; i < N; i++)
- {
- a[i] = 1.0;
- b[i] = 0.0;
- }
-
-#pragma acc parallel loop copy (a[0:N]) copy (b[0:N])
- for (i = 0; i < N; i++)
- {
- b[i] = 2.0;
- a[i] = a[i] + b[i];
- }
-
- for (i = 0; i < N; i++)
- {
- if (a[i] != 3.0)
- abort ();
-
- if (b[i] != 2.0)
- abort ();
- }
-
-#pragma acc kernels loop copy (a[0:N]) copy (b[0:N])
- for (i = 0; i < N; i++)
- {
- b[i] = 3.0;
- a[i] = a[i] + b[i];
- }
-
- for (i = 0; i < N; i++)
- {
- if (a[i] != 6.0)
- abort ();
-
- if (b[i] != 3.0)
- abort ();
- }
-
- return 0;
-
-}
--- /dev/null
+/* This test exercises combined directives. */
+
+/* { dg-do run } */
+
+#include <stdlib.h>
+
+int
+main (int argc, char **argv)
+{
+ const int N = 32;
+ float a[N], b[N];
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ a[i] = 1.0;
+ b[i] = 0.0;
+ }
+
+#pragma acc parallel loop copy (a[0:N]) copy (b[0:N])
+ for (i = 0; i < N; i++)
+ {
+ b[i] = 2.0;
+ a[i] = a[i] + b[i];
+ }
+
+ for (i = 0; i < N; i++)
+ {
+ if (a[i] != 3.0)
+ abort ();
+
+ if (b[i] != 2.0)
+ abort ();
+ }
+
+#pragma acc kernels loop copy (a[0:N]) copy (b[0:N])
+ for (i = 0; i < N; i++)
+ {
+ b[i] = 3.0;
+ a[i] = a[i] + b[i];
+ }
+
+ for (i = 0; i < N; i++)
+ {
+ if (a[i] != 6.0)
+ abort ();
+
+ if (b[i] != 3.0)
+ abort ();
+ }
+
+ return 0;
+
+}
+++ /dev/null
-! { dg-do run }
-
-program main
- integer, parameter :: n = 32
- real :: a(n), b(n);
- integer :: i
-
- do i = 1, n
- a(i) = 1.0
- b(i) = 0.0
- end do
-
- !$acc parallel loop copy (a(1:n)) copy (b(1:n))
- do i = 1, n
- b(i) = 2.0
- a(i) = a(i) + b(i)
- end do
-
- do i = 1, n
- if (a(i) .ne. 3.0) call abort
-
- if (b(i) .ne. 2.0) call abort
- end do
-
- !$acc kernels loop copy (a(1:n)) copy (b(1:n))
- do i = 1, n
- b(i) = 3.0;
- a(i) = a(i) + b(i)
- end do
-
- do i = 1, n
- if (a(i) .ne. 6.0) call abort
-
- if (b(i) .ne. 3.0) call abort
- end do
-
-end program main
--- /dev/null
+! This test exercises combined directives.
+
+! { dg-do run }
+
+program main
+ integer, parameter :: n = 32
+ real :: a(n), b(n);
+ integer :: i
+
+ do i = 1, n
+ a(i) = 1.0
+ b(i) = 0.0
+ end do
+
+ !$acc parallel loop copy (a(1:n)) copy (b(1:n))
+ do i = 1, n
+ b(i) = 2.0
+ a(i) = a(i) + b(i)
+ end do
+
+ do i = 1, n
+ if (a(i) .ne. 3.0) call abort
+
+ if (b(i) .ne. 2.0) call abort
+ end do
+
+ !$acc kernels loop copy (a(1:n)) copy (b(1:n))
+ do i = 1, n
+ b(i) = 3.0;
+ a(i) = a(i) + b(i)
+ end do
+
+ do i = 1, n
+ if (a(i) .ne. 6.0) call abort
+
+ if (b(i) .ne. 3.0) call abort
+ end do
+
+end program main