@@ -1,3 +1,8 @@
+2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
+
+ * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
+ clauses.
+
2018-11-27 Martin Liska <mliska@suse.cz>
* decl.c (gfc_match_gcc_builtin): New function.
@@ -1876,7 +1876,6 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
break;
case 'w':
if ((mask & OMP_CLAUSE_WAIT)
- && !c->wait
&& gfc_match ("wait") == MATCH_YES)
{
c->wait = true;
@@ -1,3 +1,8 @@
+2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc/asyncwait-5.c: New file.
+ * gfortran.dg/goacc/asyncwait-5.f: Likewise.
+
2018-11-30 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
new file mode 100644
@@ -0,0 +1,14 @@
+/* Multiple OpenACC wait clauses. */
+
+/* { dg-additional-options "-fdump-tree-original" } */
+
+void f()
+{
+#pragma acc parallel async (1) wait (14)
+ ;
+ /* { dg-final { scan-tree-dump-times "(?n)#pragma acc parallel wait\\(14\\) async\\(1\\)$" 1 "original" } } */
+
+#pragma acc parallel async (2) wait (11, 12) wait (13)
+ ;
+ /* { dg-final { scan-tree-dump-times "(?n)#pragma acc parallel wait\\(13\\) wait\\(12\\) wait\\(11\\) async\\(2\\)\$" 1 "original" } } */
+}
new file mode 100644
@@ -0,0 +1,13 @@
+! Multiple OpenACC wait clauses.
+
+! { dg-additional-options "-fdump-tree-original" }
+
+!$ACC PARALLEL ASYNC (1) WAIT (14)
+!$ACC END PARALLEL
+! { dg-final { scan-tree-dump-times "(?n)#pragma acc parallel async\\(1\\) wait\\(14\\)$" 1 "original" } }
+
+!$ACC PARALLEL ASYNC (2) WAIT (11, 12) WAIT(13)
+!$ACC END PARALLEL
+! { dg-final { scan-tree-dump-times "(?n)#pragma acc parallel async\\(2\\) wait\\(11\\) wait\\(12\\) wait\\(13\\)$" 1 "original" } }
+
+ END