aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-15 15:32:39 +0200
committerMartin Liska <mliska@suse.cz>2022-10-15 15:32:39 +0200
commit2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9 (patch)
treeb118381a0a883a762ddd56c0e91608d937ee8bdf /libgomp
parentbd21c04269deded2c7476ceca1100a26f28ea526 (diff)
parentbaeec7cc83b19b46d1c73523f06efa7ea2b30390 (diff)
downloadgcc-2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9.zip
gcc-2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9.tar.gz
gcc-2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog10
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-7.f9022
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-8.f9013
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-in-explicit-1.f90113
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-in-explicit-2.f9021
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-in-explicit-3.f9031
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-reduction-17.f9032
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-reduction-18.f9015
8 files changed, 257 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index d06c05e..a339a7d 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,13 @@
+2022-10-13 Tobias Burnus <tobias@codesourcery.com>
+
+ * testsuite/libgomp.fortran/task-7.f90: New test.
+ * testsuite/libgomp.fortran/task-8.f90: New test.
+ * testsuite/libgomp.fortran/task-in-explicit-1.f90: New test.
+ * testsuite/libgomp.fortran/task-in-explicit-2.f90: New test.
+ * testsuite/libgomp.fortran/task-in-explicit-3.f90: New test.
+ * testsuite/libgomp.fortran/task-reduction-17.f90: New test.
+ * testsuite/libgomp.fortran/task-reduction-18.f90: New test.
+
2022-10-12 Jakub Jelinek <jakub@redhat.com>
* libgomp.texi (OpenMP 5.2): Fix up allocator -> allocate directive
diff --git a/libgomp/testsuite/libgomp.fortran/task-7.f90 b/libgomp/testsuite/libgomp.fortran/task-7.f90
new file mode 100644
index 0000000..e806bd7
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-7.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+
+program main
+ use omp_lib
+ implicit none
+
+ !$omp task final (.true.)
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp target nowait
+ if (omp_in_final ()) &
+ error stop
+ !$omp end target
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp taskwait
+ !$omp end task
+ !$omp end task
+end
diff --git a/libgomp/testsuite/libgomp.fortran/task-8.f90 b/libgomp/testsuite/libgomp.fortran/task-8.f90
new file mode 100644
index 0000000..037c63b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-8.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+
+program main
+ implicit none
+ integer :: i
+ i = 0
+ !$omp task
+ !$omp target nowait private (i)
+ i = 1
+ !$omp end target
+ !$omp taskwait
+ !$omp end task
+end
diff --git a/libgomp/testsuite/libgomp.fortran/task-in-explicit-1.f90 b/libgomp/testsuite/libgomp.fortran/task-in-explicit-1.f90
new file mode 100644
index 0000000..b6fa21b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-in-explicit-1.f90
@@ -0,0 +1,113 @@
+! { dg-do run }
+
+program main
+ use omp_lib
+ implicit none
+ integer :: i
+
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+
+ !$omp task final (.true.)
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp end task
+
+ !$omp parallel
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp task if (.false.)
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp task if (.false.)
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp end task
+ !$omp task final (.true.)
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp barrier
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp taskloop num_tasks (24)
+ do i = 1, 32
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ end do
+ !$omp masked
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp end masked
+ !$omp barrier
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp end parallel
+
+ !$omp target
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp task if (.false.)
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp end target
+
+ !$omp target teams
+ !$omp distribute
+ do i = 1, 4
+ if (omp_in_explicit_task ()) then
+ error stop
+ else
+ !$omp parallel
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp barrier
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp end parallel
+ end if
+ end do
+ !$omp end target teams
+
+ !$omp teams
+ !$omp distribute
+ do i = 1, 4
+ if (omp_in_explicit_task ()) then
+ error stop
+ else
+ !$omp parallel
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp barrier
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp end parallel
+ end if
+ end do
+ !$omp end distribute
+ !$omp end teams
+end
diff --git a/libgomp/testsuite/libgomp.fortran/task-in-explicit-2.f90 b/libgomp/testsuite/libgomp.fortran/task-in-explicit-2.f90
new file mode 100644
index 0000000..c615ff6
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-in-explicit-2.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+
+program main
+ use omp_lib
+ implicit none
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp target nowait
+ if (omp_in_explicit_task ()) &
+ error stop
+ !$omp end target
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp taskwait
+ !$omp end task
+ !$omp end task
+end
diff --git a/libgomp/testsuite/libgomp.fortran/task-in-explicit-3.f90 b/libgomp/testsuite/libgomp.fortran/task-in-explicit-3.f90
new file mode 100644
index 0000000..629c567
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-in-explicit-3.f90
@@ -0,0 +1,31 @@
+! { dg-do run }
+
+module m
+ integer :: a
+end module m
+
+program main
+ use omp_lib
+ use m
+ implicit none
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp taskgroup task_reduction (+: a)
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp task in_reduction (+: a)
+ a = a + 1
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp end task
+ !$omp end taskgroup
+ if (.not. omp_in_explicit_task ()) &
+ error stop
+ !$omp taskwait
+ !$omp end task
+ !$omp end task
+end
diff --git a/libgomp/testsuite/libgomp.fortran/task-reduction-17.f90 b/libgomp/testsuite/libgomp.fortran/task-reduction-17.f90
new file mode 100644
index 0000000..12a8962
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-reduction-17.f90
@@ -0,0 +1,32 @@
+! { dg-do run }
+
+module m
+ integer a
+end module m
+
+program main
+ use omp_lib
+ use m
+ implicit none
+
+ !$omp task final (.true.)
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp task
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp taskgroup task_reduction (+: a)
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp task in_reduction (+: a)
+ a = a + 1
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp end task
+ !$omp end taskgroup
+ if (.not. omp_in_final ()) &
+ error stop
+ !$omp taskwait
+ !$omp end task
+ !$omp end task
+end
diff --git a/libgomp/testsuite/libgomp.fortran/task-reduction-18.f90 b/libgomp/testsuite/libgomp.fortran/task-reduction-18.f90
new file mode 100644
index 0000000..0cbd471
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/task-reduction-18.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+
+module m
+ integer :: a = 0
+end module m
+
+program main
+ !$omp task
+ !$omp taskgroup task_reduction (+: a)
+ !$omp task in_reduction (+: a)
+ a = a + 1
+ !$omp end task
+ !$omp end taskgroup
+ !$omp end task
+end