[gomp5] depend/depobj adjustments

Message ID 20180801174948.GT17988@tucnak
State New
Headers show
Series
  • [gomp5] depend/depobj adjustments
Related show

Commit Message

Jakub Jelinek Aug. 1, 2018, 5:49 p.m.
Hi!

A change is being voted into OpenMP 5.0, where the depend clause
modifiers are separated from dependence type with a comma rather than
colon (mostly for consistency with other clauses), and more importantly,
dependence type is no longer optional, the clauses previously without
dependence type should now use depobj dependence type (this is to make
parsing non-ambiguous).

Tested on x86_64-linux, committed to gomp-5_0-branch.

2018-08-01  Jakub Jelinek  <jakub@redhat.com>

	* tree-core.h (enum omp_clause_depend_kind): Remove
	OMP_CLAUSE_DEPEND_UNSPECIFIED, add OMP_CLAUSE_DEPEND_DEPOBJ.
	* gimplify.c (gimplify_omp_depend): Handle OMP_CLAUSE_DEPEND_DEPOBJ
	instead of OMP_CLAUSE_DEPEND_UNSPECIFIED.
	* omp-low.c (lower_depend_clauses): Likewise.
	* tree-pretty-print.c (dump_omp_clause): Likewise, print the
	dependence type unconditionally.
gcc/c-family/
	* c-omp.c (c_finish_omp_depobj): Test for OMP_CLAUSE_DEPEND_DEPOBJ
	on clause instead of OMP_CLAUSE_DEPEND_UNSPECIFIED, adjust diagnostics
	in that case.  Expect kind to be OMP_CLAUSE_DEPEND_SOURCE if clause
	is specified, rather than OMP_CLAUSE_DEPEND_UNSPECIFIED.
gcc/c/
	* c-parser.c (c_parser_omp_clause_depend): Adjust parsing for
	dependence type to be no longer optional and dependence modifier
	separated from dependence type by comma rather than colon.  Parse
	depobj dependence type.
	(c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_SOURCE instead of
	OMP_CLAUSE_DEPEND_UNSPECIFIED.
	* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEPEND_DEPOBJ
	instead of OMP_CLAUSE_DEPEND_UNSPECIFIED, adjust diagnostics.
gcc/cp/
	* parser.c (cp_parser_omp_clause_depend): Adjust parsing for
	dependence type to be no longer optional and dependence modifier
	separated from dependence type by comma rather than colon.  Parse
	depobj dependence type.
	(cp_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_SOURCE instead of
	OMP_CLAUSE_DEPEND_UNSPECIFIED.
	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DEPEND_DEPOBJ
	instead of OMP_CLAUSE_DEPEND_UNSPECIFIED, adjust diagnostics.
	* pt.c (tsubst_expr): Use OMP_CLAUSE_DEPEND_SOURCE instead of
	OMP_CLAUSE_DEPEND_UNSPECIFIED.
gcc/testsuite/
	* c-c++-common/gomp/depend-iterator-1.c (foo, bar, baz): Separate
	dependence modifier from type with comma instead of colon.
	* c-c++-common/gomp/taskwait-depend-1.c (foo): Likewise.
	* c-c++-common/gomp/depobj-1.c (f1, f2, f3): Likewise.  Add depobj: to
	depend clauses without dependence type.  Add an extra test for depobj
	construct with depobj: type on depend clause and omp_depend_t type of
	the lvalue.
	* c-c++-common/gomp/depend-iterator-2.c (f1, f2, f3): Separate
	dependence modifier from type with comma instead of colon.  Adjust
	diagnostics for dependence type no longer being optional.
	* g++.dg/gomp/depend-iterator-1.C (foo, bar, baz): Separate
	dependence modifier from type with comma instead of colon.
	* g++.dg/gomp/depend-iterator-2.C (f1, f2, f3, f4): Likewise.  Adjust
	diagnostics for dependence type no longer being optional.
	* g++.dg/gomp/depobj-1.C (f1, f2, f4, f5): Separate dependence modifier
	from type with comma instead of colon.  Add depobj: to depend clauses
	without dependence type.  Add an extra test for depobj construct with
	depobj: type on depend clause and omp_depend_t type of the lvalue.
libgomp/
	* testsuite/libgomp.c-c++-common/depend-iterator-1.c (main): Separate
	dependence modifier from type with comma instead of colon.
	* testsuite/libgomp.c-c++-common/depend-iterator-2.c (foo): Likewise.
	* testsuite/libgomp.c-c++-common/depobj-1.c (dep, dep2, dep3,
	antidep): Add depobj: to depend clauses without dependence type.
	* testsuite/libgomp.c++/depend-iterator-1.C (bar, baz): Separate
	dependence modifier from type with comma instead of colon.
	* testsuite/libgomp.c++/depobj-1.C (dep, dep2, dep3, antidep): Add
	depobj: to depend clauses without dependence type.


	Jakub

Patch

--- gcc/tree-core.h.jj	2018-07-10 11:36:00.291380752 +0200
+++ gcc/tree-core.h	2018-08-01 16:36:02.709901571 +0200
@@ -1408,13 +1408,13 @@  struct GTY(()) tree_constructor {
 
 enum omp_clause_depend_kind
 {
-  OMP_CLAUSE_DEPEND_UNSPECIFIED,
   OMP_CLAUSE_DEPEND_IN,
   OMP_CLAUSE_DEPEND_OUT,
   OMP_CLAUSE_DEPEND_INOUT,
   OMP_CLAUSE_DEPEND_MUTEXINOUTSET,
   OMP_CLAUSE_DEPEND_SOURCE,
   OMP_CLAUSE_DEPEND_SINK,
+  OMP_CLAUSE_DEPEND_DEPOBJ,
   OMP_CLAUSE_DEPEND_LAST
 };
 
--- gcc/gimplify.c.jj	2018-08-01 14:34:53.945975952 +0200
+++ gcc/gimplify.c	2018-08-01 16:36:33.391000517 +0200
@@ -7547,7 +7547,7 @@  gimplify_omp_depend (tree *list_p, gimpl
 	  case OMP_CLAUSE_DEPEND_MUTEXINOUTSET:
 	    i = 1;
 	    break;
-	  case OMP_CLAUSE_DEPEND_UNSPECIFIED:
+	  case OMP_CLAUSE_DEPEND_DEPOBJ:
 	    i = 3;
 	    break;
 	  case OMP_CLAUSE_DEPEND_SOURCE:
@@ -7761,7 +7761,7 @@  gimplify_omp_depend (tree *list_p, gimpl
 	  case OMP_CLAUSE_DEPEND_MUTEXINOUTSET:
 	    i = 1;
 	    break;
-	  case OMP_CLAUSE_DEPEND_UNSPECIFIED:
+	  case OMP_CLAUSE_DEPEND_DEPOBJ:
 	    i = 3;
 	    break;
 	  case OMP_CLAUSE_DEPEND_SOURCE:
--- gcc/omp-low.c.jj	2018-07-24 18:11:57.201917314 +0200
+++ gcc/omp-low.c	2018-08-01 16:37:02.436094166 +0200
@@ -7386,7 +7386,7 @@  lower_depend_clauses (tree *pclauses, gi
 	case OMP_CLAUSE_DEPEND_MUTEXINOUTSET:
 	  cnt[1]++;
 	  break;
-	case OMP_CLAUSE_DEPEND_UNSPECIFIED:
+	case OMP_CLAUSE_DEPEND_DEPOBJ:
 	  cnt[3]++;
 	  break;
 	case OMP_CLAUSE_DEPEND_SOURCE:
@@ -7443,7 +7443,7 @@  lower_depend_clauses (tree *pclauses, gi
 		if (i != 1)
 		  continue;
 		break;
-	      case OMP_CLAUSE_DEPEND_UNSPECIFIED:
+	      case OMP_CLAUSE_DEPEND_DEPOBJ:
 		if (i != 3)
 		  continue;
 		break;
--- gcc/tree-pretty-print.c.jj	2018-07-30 18:22:56.159264665 +0200
+++ gcc/tree-pretty-print.c	2018-08-01 16:38:00.110280161 +0200
@@ -681,8 +681,8 @@  dump_omp_clause (pretty_printer *pp, tre
       pp_string (pp, "depend(");
       switch (OMP_CLAUSE_DEPEND_KIND (clause))
 	{
-	case OMP_CLAUSE_DEPEND_UNSPECIFIED:
-	  name = NULL;
+	case OMP_CLAUSE_DEPEND_DEPOBJ:
+	  name = "depobj";
 	  break;
 	case OMP_CLAUSE_DEPEND_IN:
 	  name = "in";
@@ -737,11 +737,8 @@  dump_omp_clause (pretty_printer *pp, tre
 	    pp_colon (pp);
 	    t = TREE_VALUE (t);
 	  }
-	if (name)
-	  {
-	    pp_string (pp, name);
-	    pp_colon (pp);
-	  }
+	pp_string (pp, name);
+	pp_colon (pp);
 	dump_generic_node (pp, t, spc, flags, false);
 	pp_right_paren (pp);
       }
--- gcc/c-family/c-omp.c.jj	2018-08-01 14:04:30.178369000 +0200
+++ gcc/c-family/c-omp.c	2018-08-01 17:30:00.841067774 +0200
@@ -477,10 +477,10 @@  c_finish_omp_depobj (location_t loc, tre
 		  "construct");
       switch (OMP_CLAUSE_DEPEND_KIND (clause))
 	{
-	case OMP_CLAUSE_DEPEND_UNSPECIFIED:
+	case OMP_CLAUSE_DEPEND_DEPOBJ:
 	  error_at (OMP_CLAUSE_LOCATION (clause),
-		    "dependence type must be specified in %<depend%> clause "
-		    "on %<depobj%> construct");
+		    "%<depobj%> dependence type specified in %<depend%> "
+		    "clause on %<depobj%> construct");
 	  return;
 	case OMP_CLAUSE_DEPEND_SOURCE:
 	case OMP_CLAUSE_DEPEND_SINK:
@@ -519,7 +519,7 @@  c_finish_omp_depobj (location_t loc, tre
 	}
     }
   else
-    gcc_assert (kind != OMP_CLAUSE_DEPEND_UNSPECIFIED);
+    gcc_assert (kind != OMP_CLAUSE_DEPEND_SOURCE);
 
   if (depobj == error_mark_node)
     return;
--- gcc/c/c-parser.c.jj	2018-07-31 13:53:31.320112896 +0200
+++ gcc/c/c-parser.c	2018-08-01 17:27:10.069513226 +0200
@@ -13940,13 +13940,22 @@  c_parser_omp_iterators (c_parser *parser
    OpenMP 4.5:
    depend ( source )
 
-   depend ( sink  : vec )  */
+   depend ( sink  : vec )
+
+   OpenMP 5.0:
+   depend ( depend-modifier , depend-kind: variable-list )
+   
+   depend-kind:
+     in | out | inout | mutexinoutset | depobj
+
+   depend-modifier:
+     iterator ( iterators-definition )  */
 
 static tree
 c_parser_omp_clause_depend (c_parser *parser, tree list)
 {
   location_t clause_loc = c_parser_peek_token (parser)->location;
-  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_UNSPECIFIED;
+  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_LAST;
   tree nl, c, iterators = NULL_TREE;
 
   matching_parens parens;
@@ -13956,31 +13965,15 @@  c_parser_omp_clause_depend (c_parser *pa
   do
     {
       if (c_parser_next_token_is_not (parser, CPP_NAME))
-	break;
+	goto invalid_kind;
 
       const char *p = IDENTIFIER_POINTER (c_parser_peek_token (parser)->value);
-      if (strcmp ("iterator", p) == 0
-	  && iterators == NULL_TREE
-	  && c_parser_peek_2nd_token (parser)->type == CPP_OPEN_PAREN)
-	{
-	  /* FIXME: if depend kind remains optional, this is ambiguous
-	     and we'd need to do tentative parsing to distinguish between
-	     valid iterator modifier and just normal expression starting
-	     with iterator ( tokens.  Not doing it right now, as I hope
-	     it will become mandatory.  */
+      if (strcmp ("iterator", p) == 0 && iterators == NULL_TREE)
+	{
 	  iterators = c_parser_omp_iterators (parser);
-	  c_parser_require (parser, CPP_COLON, "expected %<:%>");
+	  c_parser_require (parser, CPP_COMMA, "expected %<,%>");
 	  continue;
 	}
-      if (strcmp ("source", p) == 0
-	  && c_parser_peek_2nd_token (parser)->type == CPP_CLOSE_PAREN)
-	{
-	  /* FIXME: this is another ambiguity.  */
-	  kind = OMP_CLAUSE_DEPEND_SOURCE;
-	  break;
-	}
-      if (c_parser_peek_2nd_token (parser)->type != CPP_COLON)
-	break;
       if (strcmp ("in", p) == 0)
 	kind = OMP_CLAUSE_DEPEND_IN;
       else if (strcmp ("inout", p) == 0)
@@ -13989,16 +13982,19 @@  c_parser_omp_clause_depend (c_parser *pa
 	kind = OMP_CLAUSE_DEPEND_MUTEXINOUTSET;
       else if (strcmp ("out", p) == 0)
 	kind = OMP_CLAUSE_DEPEND_OUT;
+      else if (strcmp ("depobj", p) == 0)
+	kind = OMP_CLAUSE_DEPEND_DEPOBJ;
       else if (strcmp ("sink", p) == 0)
 	kind = OMP_CLAUSE_DEPEND_SINK;
+      else if (strcmp ("source", p) == 0)
+	kind = OMP_CLAUSE_DEPEND_SOURCE;
       else
 	goto invalid_kind;
       break;
     }
   while (1);
 
-  if (kind != OMP_CLAUSE_DEPEND_UNSPECIFIED)
-    c_parser_consume_token (parser);
+  c_parser_consume_token (parser);
 
   if (iterators
       && (kind == OMP_CLAUSE_DEPEND_SOURCE || kind == OMP_CLAUSE_DEPEND_SINK))
@@ -14019,8 +14015,7 @@  c_parser_omp_clause_depend (c_parser *pa
       return c;
     }
 
-  if (kind != OMP_CLAUSE_DEPEND_UNSPECIFIED
-      && !c_parser_require (parser, CPP_COLON, "expected %<:%>"))
+  if (!c_parser_require (parser, CPP_COLON, "expected %<:%>"))
     goto resync_fail;
 
   if (kind == OMP_CLAUSE_DEPEND_SINK)
@@ -16172,7 +16167,7 @@  c_parser_omp_depobj (c_parser *parser)
 
   parens.skip_until_found_close (parser);
   tree clause = NULL_TREE;
-  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_UNSPECIFIED;
+  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_SOURCE;
   location_t c_loc = c_parser_peek_token (parser)->location;
   if (c_parser_next_token_is (parser, CPP_NAME))
     {
@@ -16209,7 +16204,7 @@  c_parser_omp_depobj (c_parser *parser)
 		  else if (!strcmp ("mutexinoutset", p2))
 		    kind = OMP_CLAUSE_DEPEND_MUTEXINOUTSET;
 		}
-	      if (kind == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+	      if (kind == OMP_CLAUSE_DEPEND_SOURCE)
 		{
 		  clause = error_mark_node;
 		  error_at (c2_loc, "expected %<in%>, %<out%>, %<inout%> or "
@@ -16221,7 +16216,7 @@  c_parser_omp_depobj (c_parser *parser)
 	    clause = error_mark_node;
 	}
     }
-  if (!clause && kind == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+  if (!clause && kind == OMP_CLAUSE_DEPEND_SOURCE)
     {
       clause = error_mark_node;
       error_at (c_loc, "expected %<depend%>, %<destroy%> or %<update%> clause");
--- gcc/c/c-typeck.c.jj	2018-07-10 11:32:27.025161453 +0200
+++ gcc/c/c-typeck.c	2018-08-01 17:00:46.329549760 +0200
@@ -13786,12 +13786,11 @@  c_finish_omp_clauses (tree clauses, enum
 	    {
 	      if (handle_omp_array_sections (c, ort))
 		remove = true;
-	      else if (OMP_CLAUSE_DEPEND_KIND (c)
-		       == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+	      else if (OMP_CLAUSE_DEPEND_KIND (c) == OMP_CLAUSE_DEPEND_DEPOBJ)
 		{
 		  error_at (OMP_CLAUSE_LOCATION (c),
-			    "%<depend%> clause without dependence type "
-			    "on array section");
+			    "%<depend%> clause with %<depobj%> dependence "
+			    "type on array section");
 		  remove = true;
 		}
 	      break;
@@ -13812,13 +13811,14 @@  c_finish_omp_clauses (tree clauses, enum
 			"bit-field %qE in %qs clause", t, "depend");
 	      remove = true;
 	    }
-	  else if (OMP_CLAUSE_DEPEND_KIND (c) == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+	  else if (OMP_CLAUSE_DEPEND_KIND (c) == OMP_CLAUSE_DEPEND_DEPOBJ)
 	    {
 	      if (!c_omp_depend_t_p (TREE_TYPE (t)))
 		{
 		  error_at (OMP_CLAUSE_LOCATION (c),
 			    "%qE does not have %<omp_depend_t%> type in "
-			    "%<depend%> clause without dependence type", t);
+			    "%<depend%> clause with %<depobj%> dependence "
+			    "type", t);
 		  remove = true;
 		}
 	    }
@@ -13826,7 +13826,8 @@  c_finish_omp_clauses (tree clauses, enum
 	    {
 	      error_at (OMP_CLAUSE_LOCATION (c),
 			"%qE should not have %<omp_depend_t%> type in "
-			"%<depend%> clause with dependence type", t);
+			"%<depend%> clause with dependence type other than "
+			"%<depobj%>", t);
 	      remove = true;
 	    }
 	  if (!remove)
--- gcc/cp/parser.c.jj	2018-07-31 13:56:33.842637416 +0200
+++ gcc/cp/parser.c	2018-08-01 17:37:54.378605484 +0200
@@ -33771,13 +33771,22 @@  cp_parser_omp_iterators (cp_parser *pars
    OpenMP 4.5:
    depend ( source )
 
-   depend ( sink : vec ) */
+   depend ( sink : vec )
+
+   OpenMP 5.0:
+   depend ( depend-modifier , depend-kind: variable-list )
+
+   depend-kind:
+     in | out | inout | mutexinoutset | depobj
+
+   depend-modifier:
+     iterator ( iterators-definition )  */
 
 static tree
 cp_parser_omp_clause_depend (cp_parser *parser, tree list, location_t loc)
 {
   tree nlist, c, iterators = NULL_TREE;
-  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_UNSPECIFIED;
+  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_LAST;
 
   matching_parens parens;
   if (!parens.require_open (parser))
@@ -33786,44 +33795,18 @@  cp_parser_omp_clause_depend (cp_parser *
   do
     {
       if (cp_lexer_next_token_is_not (parser->lexer, CPP_NAME))
-	break;
+	goto invalid_kind;
 
       tree id = cp_lexer_peek_token (parser->lexer)->u.value;
       const char *p = IDENTIFIER_POINTER (id);
 
-      if (strcmp ("iterator", p) == 0
-	  && iterators == NULL_TREE
-	  && cp_lexer_nth_token_is (parser->lexer, 2, CPP_OPEN_PAREN))
-	{
-	  cp_lexer_save_tokens (parser->lexer);
-	  cp_lexer_consume_token (parser->lexer);
-	  cp_lexer_consume_token (parser->lexer);
-	  bool is_iter
-	    = (cp_parser_skip_to_closing_parenthesis (parser, false, false,
-						      /*consume_paren=*/true)
-	       && cp_lexer_next_token_is (parser->lexer, CPP_COLON));
-
-	  /* Roll back the tokens we skipped.  */
-	  cp_lexer_rollback_tokens (parser->lexer);
-
-	  if (is_iter)
-	    {
-	      begin_scope (sk_omp, NULL);
-	      iterators = cp_parser_omp_iterators (parser);
-	      cp_parser_require (parser, CPP_COLON, RT_COLON);
-	      continue;
-	    }
-	}
-      if (strcmp ("source", p) == 0
-	  && cp_lexer_nth_token_is (parser->lexer, 2, CPP_CLOSE_PAREN))
+      if (strcmp ("iterator", p) == 0 && iterators == NULL_TREE)
 	{
-	  /* FIXME: this is ambiguous.  */
-	  kind = OMP_CLAUSE_DEPEND_SOURCE;
-	  break;
+	  begin_scope (sk_omp, NULL);
+	  iterators = cp_parser_omp_iterators (parser);
+	  cp_parser_require (parser, CPP_COMMA, RT_COMMA);
+	  continue;
 	}
-
-      if (!cp_lexer_nth_token_is (parser->lexer, 2, CPP_COLON))
-	break;
       if (strcmp ("in", p) == 0)
 	kind = OMP_CLAUSE_DEPEND_IN;
       else if (strcmp ("inout", p) == 0)
@@ -33832,16 +33815,19 @@  cp_parser_omp_clause_depend (cp_parser *
 	kind = OMP_CLAUSE_DEPEND_MUTEXINOUTSET;
       else if (strcmp ("out", p) == 0)
 	kind = OMP_CLAUSE_DEPEND_OUT;
+      else if (strcmp ("depobj", p) == 0)
+	kind = OMP_CLAUSE_DEPEND_DEPOBJ;
       else if (strcmp ("sink", p) == 0)
 	kind = OMP_CLAUSE_DEPEND_SINK;
+      else if (strcmp ("source", p) == 0)
+	kind = OMP_CLAUSE_DEPEND_SOURCE;
       else
 	goto invalid_kind;
       break;
     }
   while (1);
 
-  if (kind != OMP_CLAUSE_DEPEND_UNSPECIFIED)
-    cp_lexer_consume_token (parser->lexer);
+  cp_lexer_consume_token (parser->lexer);
 
   if (iterators
       && (kind == OMP_CLAUSE_DEPEND_SOURCE || kind == OMP_CLAUSE_DEPEND_SINK))
@@ -33865,8 +33851,7 @@  cp_parser_omp_clause_depend (cp_parser *
       return c;
     }
 
-  if (kind != OMP_CLAUSE_DEPEND_UNSPECIFIED
-      && !cp_parser_require (parser, CPP_COLON, RT_COLON))
+  if (!cp_parser_require (parser, CPP_COLON, RT_COLON))
     goto resync_fail;
 
   if (kind == OMP_CLAUSE_DEPEND_SINK)
@@ -35354,7 +35339,7 @@  cp_parser_omp_depobj (cp_parser *parser,
 					   /*consume_paren=*/true);
 
   tree clause = NULL_TREE;
-  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_UNSPECIFIED;
+  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_SOURCE;
   location_t c_loc = cp_lexer_peek_token (parser->lexer)->location;
   if (cp_lexer_next_token_is (parser->lexer, CPP_NAME))
     {
@@ -35394,7 +35379,7 @@  cp_parser_omp_depobj (cp_parser *parser,
 		  else if (!strcmp ("mutexinoutset", p2))
 		    kind = OMP_CLAUSE_DEPEND_MUTEXINOUTSET;
 		}
-	      if (kind == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+	      if (kind == OMP_CLAUSE_DEPEND_SOURCE)
 		{
 		  clause = error_mark_node;
 		  error_at (c2_loc, "expected %<in%>, %<out%>, %<inout%> or "
@@ -35410,7 +35395,7 @@  cp_parser_omp_depobj (cp_parser *parser,
 	    clause = error_mark_node;
 	}
     }
-  if (!clause && kind == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+  if (!clause && kind == OMP_CLAUSE_DEPEND_SOURCE)
     {
       clause = error_mark_node;
       error_at (c_loc, "expected %<depend%>, %<destroy%> or %<update%> clause");
--- gcc/cp/semantics.c.jj	2018-07-25 11:41:47.760405527 +0200
+++ gcc/cp/semantics.c	2018-08-01 17:16:25.767685638 +0200
@@ -6843,12 +6843,11 @@  finish_omp_clauses (tree clauses, enum c
 	    {
 	      if (handle_omp_array_sections (c, ort))
 		remove = true;
-	      else if (OMP_CLAUSE_DEPEND_KIND (c)
-		       == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+	      else if (OMP_CLAUSE_DEPEND_KIND (c) == OMP_CLAUSE_DEPEND_DEPOBJ)
 		{
 		  error_at (OMP_CLAUSE_LOCATION (c),
-			    "%<depend%> clause without dependence type "
-			    "on array section");
+			    "%<depend%> clause with %<depobj%> dependence "
+			    "type on array section");
 		  remove = true;
 		}
 	      break;
@@ -6884,7 +6883,7 @@  finish_omp_clauses (tree clauses, enum c
 			"bit-field %qE in %qs clause", t, "depend");
 	      remove = true;
 	    }
-	  else if (OMP_CLAUSE_DEPEND_KIND (c) == OMP_CLAUSE_DEPEND_UNSPECIFIED)
+	  else if (OMP_CLAUSE_DEPEND_KIND (c) == OMP_CLAUSE_DEPEND_DEPOBJ)
 	    {
 	      if (!c_omp_depend_t_p (TYPE_REF_P (TREE_TYPE (t))
 				     ? TREE_TYPE (TREE_TYPE (t))
@@ -6892,7 +6891,8 @@  finish_omp_clauses (tree clauses, enum c
 		{
 		  error_at (OMP_CLAUSE_LOCATION (c),
 			    "%qE does not have %<omp_depend_t%> type in "
-			    "%<depend%> clause without dependence type", t);
+			    "%<depend%> clause with %<depobj%> dependence "
+			    "type", t);
 		  remove = true;
 		}
 	    }
@@ -6902,7 +6902,8 @@  finish_omp_clauses (tree clauses, enum c
 	    {
 	      error_at (OMP_CLAUSE_LOCATION (c),
 			"%qE should not have %<omp_depend_t%> type in "
-			"%<depend%> clause with dependence type", t);
+			"%<depend%> clause with dependence type other than "
+			"%<depobj%>", t);
 	      remove = true;
 	    }
 	  if (!remove)
--- gcc/cp/pt.c.jj	2018-07-25 11:44:17.162642291 +0200
+++ gcc/cp/pt.c	2018-08-01 17:39:48.853977209 +0200
@@ -17359,7 +17359,7 @@  tsubst_expr (tree t, tree args, tsubst_f
       r = RECUR (OMP_DEPOBJ_DEPOBJ (t));
       if (OMP_DEPOBJ_CLAUSES (t) && OMP_DEPOBJ_CLAUSES (t) != error_mark_node)
 	{
-	  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_UNSPECIFIED;
+	  enum omp_clause_depend_kind kind = OMP_CLAUSE_DEPEND_SOURCE;
 	  if (TREE_CODE (OMP_DEPOBJ_CLAUSES (t)) == OMP_CLAUSE)
 	    {
 	      tmp = tsubst_omp_clauses (OMP_DEPOBJ_CLAUSES (t), C_ORT_OMP,
@@ -17377,7 +17377,7 @@  tsubst_expr (tree t, tree args, tsubst_f
 	}
       else
 	finish_omp_depobj (EXPR_LOCATION (t), r,
-			   OMP_CLAUSE_DEPEND_UNSPECIFIED,
+			   OMP_CLAUSE_DEPEND_SOURCE,
 			   OMP_DEPOBJ_CLAUSES (t));
       break;
 
--- gcc/testsuite/c-c++-common/gomp/depend-iterator-1.c.jj	2018-06-12 13:35:30.116318942 +0200
+++ gcc/testsuite/c-c++-common/gomp/depend-iterator-1.c	2018-08-01 17:42:59.437392751 +0200
@@ -7,7 +7,7 @@  volatile int v;
 void
 foo (unsigned char i, signed char j)
 {
-  #pragma omp task depend (iterator (j=6:2:-2) : out : \
+  #pragma omp task depend (iterator (j=6:2:-2) , out : \
 	arr[TEST_EQ (sizeof (j), sizeof (int)), \
 	    TEST_EQ (sizeof (i), sizeof (unsigned char)), \
 	    TEST_EQ (sizeof (k), sizeof (struct S)), j], \
@@ -17,7 +17,7 @@  foo (unsigned char i, signed char j)
 	depend(out: arr[0]) \
 	depend (iterator (long long i=__LONG_LONG_MAX__ - 4:__LONG_LONG_MAX__ - 2:2, \
 			  unsigned short j=~0U-16:~0U-8:3, \
-			  short *k=&arr4[1]:&arr4[2]:1) : in : \
+			  short *k=&arr4[1]:&arr4[2]:1) , in : \
 	arr[TEST_EQ (sizeof (i), sizeof (long long)), \
 	    TEST_EQ (sizeof (j), sizeof (unsigned short)), \
 	    TEST_EQ (sizeof (k), sizeof (short *)), \
@@ -35,7 +35,7 @@  bar (unsigned char i, signed char j)
 {
   int m = j;
   int n = j + 2;
-  #pragma omp task depend (iterator (j=6:2:m) : out : \
+  #pragma omp task depend (iterator (j=6:2:m) , out : \
 	arr[TEST_EQ (sizeof (j), sizeof (int)), \
 	    TEST_EQ (sizeof (i), sizeof (unsigned char)), \
 	    TEST_EQ (sizeof (k), sizeof (struct S)), j], \
@@ -45,7 +45,7 @@  bar (unsigned char i, signed char j)
 	depend(out: arr[0]) \
 	depend (iterator (long long i=__LONG_LONG_MAX__ - 4 - n:__LONG_LONG_MAX__ - 2:2, \
 			  unsigned short j=~0U-16:~0U-8-n:3, \
-			  short *k=&arr4[1]:&arr4[n + 2]:1) : in : \
+			  short *k=&arr4[1]:&arr4[n + 2]:1) , in : \
 	arr[TEST_EQ (sizeof (i), sizeof (long long)), \
 	    TEST_EQ (sizeof (j), sizeof (unsigned short)), \
 	    TEST_EQ (sizeof (k), sizeof (short *)), \
@@ -64,10 +64,10 @@  baz (void)
   #pragma omp parallel
   #pragma omp master
   {
-    #pragma omp task depend(iterator(unsigned long int k = 0 : 2) : inout : \
+    #pragma omp task depend(iterator(unsigned long int k = 0 : 2) , inout : \
 	arr[TEST_EQ (sizeof (k), sizeof (unsigned long)), \
 	    TEST_EQ (((__typeof (k)) -1) < 0, 0), k]) \
-	depend(iterator(signed char s = -3 : -12 : -1) : out : \
+	depend(iterator(signed char s = -3 : -12 : -1) , out : \
 	arr[TEST_EQ (sizeof (s), sizeof (signed char)), \
 	    TEST_EQ (((__typeof (s)) -1) < 0, 1), s + 12])
       v++;
--- gcc/testsuite/c-c++-common/gomp/depobj-1.c.jj	2018-06-27 14:29:06.171462353 +0200
+++ gcc/testsuite/c-c++-common/gomp/depobj-1.c	2018-08-01 18:50:02.419513909 +0200
@@ -14,10 +14,10 @@  f1 (void)
 {
   #pragma omp depobj(depobj) depend(in : a)
   #pragma omp depobj(depobj) update(inout)
-  #pragma omp task depend (depobj)
+  #pragma omp task depend (depobj: depobj)
   ;
   #pragma omp depobj(depobj) destroy
-  #pragma omp task depend (iterator (i=1:3) : *(depobja + i))
+  #pragma omp task depend (iterator (i=1:3) , depobj: *(depobja + i))
   ;
   #pragma omp depobj(pdepobj[0]) depend(mutexinoutset:a)
   #pragma omp depobj(*pdepobj) destroy
@@ -36,7 +36,8 @@  f2 (void)
   #pragma omp depobj (depobjb) depend(in: a)		/* { dg-error "type of 'depobj' expression is not 'omp_depend_t'" } */
   #pragma omp depobj (pdepobj) depend(in: a)		/* { dg-error "type of 'depobj' expression is not 'omp_depend_t'" } */
   #pragma omp depobj (a) destroy			/* { dg-error "type of 'depobj' expression is not 'omp_depend_t'" } */
-  #pragma omp depobj (depobj) depend(a)			/* { dg-error "does not have 'omp_depend_t' type in 'depend' clause without dependence type" } */
+  #pragma omp depobj (depobj) depend(depobj:a)		/* { dg-error "does not have 'omp_depend_t' type in 'depend' clause with 'depobj' dependence type" } */
+  #pragma omp depobj (depobj) depend(depobj:*depobjb)	/* { dg-error "'depobj' dependence type specified in 'depend' clause on 'depobj' construct" } */
   #pragma omp depobj (depobj) update(foobar)		/* { dg-error "expected 'in', 'out', 'inout' or 'mutexinoutset'" } */
   #pragma omp depobj (depobj) depend(in: *depobja)	/* { dg-error "should not have 'omp_depend_t' type in 'depend' clause with dependence type" } */
   #pragma omp depobj (depobj) depend(in: a) depend(in: b)	/* { dg-error "expected" } */
@@ -44,7 +45,7 @@  f2 (void)
   #pragma omp depobj (depobj) depend(in: a, b)		/* { dg-error "more than one locator in 'depend' clause on 'depobj' construct" } */
   #pragma omp depobj (depobj) depend(source)		/* { dg-error "'depend\\(source\\)' is only allowed in 'omp ordered'" } */
   #pragma omp depobj (depobj) depend(sink: i + 1, j - 1)	/* { dg-error "'depend\\(sink\\)' is only allowed in 'omp ordered'" } */
-  #pragma omp depobj (depobj) depend(iterator (i = 0:2) : in : a)	/* { dg-error "'iterator' modifier may not be specified on 'depobj' construct" } */
+  #pragma omp depobj (depobj) depend(iterator (i = 0:2) , in : a)	/* { dg-error "'iterator' modifier may not be specified on 'depobj' construct" } */
   if (0)
     #pragma omp depobj (depobj) destroy			/* { dg-error "'#pragma omp depobj' may only be used in compound statements" } */
     ;
@@ -53,9 +54,9 @@  f2 (void)
 void
 f3 (void)
 {
-  #pragma omp task depend (depobja[1:2])		/* { dg-error "'depend' clause without dependence type on array section" } */
+  #pragma omp task depend (depobj: depobja[1:2])	/* { dg-error "'depend' clause with 'depobj' dependence type on array section" } */
   ;
-  #pragma omp task depend (a)				/* { dg-error "'a' does not have 'omp_depend_t' type in 'depend' clause without dependence type" } */
+  #pragma omp task depend (depobj: a)			/* { dg-error "'a' does not have 'omp_depend_t' type in 'depend' clause with 'depobj' dependence type" } */
   ;
   #pragma omp task depend (in: depobj)			/* { dg-error "'depobj' should not have 'omp_depend_t' type in 'depend' clause with dependence type" } */
   ;
--- gcc/testsuite/c-c++-common/gomp/taskwait-depend-1.c.jj	2018-06-18 19:08:01.694245920 +0200
+++ gcc/testsuite/c-c++-common/gomp/taskwait-depend-1.c	2018-08-01 17:40:46.906115624 +0200
@@ -1,7 +1,7 @@ 
 void
 foo (int *p)
 {
-  #pragma omp taskwait depend(iterator(i = 0:16) : in : p[i]) depend(out : p[32])
+  #pragma omp taskwait depend(iterator(i = 0:16) , in : p[i]) depend(out : p[32])
 }
 
 void
--- gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c.jj	2018-06-28 13:07:08.721033484 +0200
+++ gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c	2018-08-01 18:47:11.077896243 +0200
@@ -7,70 +7,70 @@  int *h;
 void
 f1 (void)
 {
-  #pragma omp task depend (iterator : in : a)	/* { dg-error "expected|invalid depend kind" } */
+  #pragma omp task depend (iterator , in : a)	/* { dg-error "expected" } */
   ;
-  #pragma omp task depend (iterator (for = 0 : 2) : in : a)	/* { dg-error "expected" } */
+  #pragma omp task depend (iterator (for = 0 : 2) , in : a)	/* { dg-error "expected" } */
   ;
-  #pragma omp task depend (iterator (5 = 0 : 2) : in : a)	/* { dg-error "expected" } */
+  #pragma omp task depend (iterator (5 = 0 : 2) , in : a)	/* { dg-error "expected" } */
   ;
-  #pragma omp task depend (iterator (i : 0 : 2) : in : a)	/* { dg-error "expected '='|name a type|expected" } */
+  #pragma omp task depend (iterator (i : 0 : 2) , in : a)	/* { dg-error "expected '='|name a type|expected" } */
   ;
-  #pragma omp task depend (iterator (i = 0, 1 : 2) : in : a)	/* { dg-error "expected" } */
+  #pragma omp task depend (iterator (i = 0, 1 : 2) , in : a)	/* { dg-error "expected" } */
   ;
-  #pragma omp task depend (iterator (i = (0, 1) : 2) : in : a)
+  #pragma omp task depend (iterator (i = (0, 1) : 2) , in : a)
   ;
-  #pragma omp task depend (iterator (i = 0 : 1 : 2 : 3) : in : a)	/* { dg-error "expected '.'" } */
+  #pragma omp task depend (iterator (i = 0 : 1 : 2 : 3) , in : a)	/* { dg-error "expected '.'" } */
   ;
-  #pragma omp task depend (iterator (i = 0 : 2, 3) : in : a)	/* { dg-error "expected" } */
+  #pragma omp task depend (iterator (i = 0 : 2, 3) , in : a)	/* { dg-error "expected" } */
   ;
-  #pragma omp task depend (iterator (i = 0 : 10 : 2, 3) : in : a)	/* { dg-error "expected" } */
+  #pragma omp task depend (iterator (i = 0 : 10 : 2, 3) , in : a)	/* { dg-error "expected" } */
   ;
-  #pragma omp task depend (iterator (i = 0:1), iterator (j = 0:1) : in : a)	/* { dg-error "expected ':'|invalid depend kind|'iterator' undeclared|was not declared|expected '\\)' before ':' token" } */
+  #pragma omp task depend (iterator (i = 0:1), iterator (j = 0:1) , in : a)	/* { dg-error "invalid depend kind" } */
   ;
-  #pragma omp task depend (iterator (i = 0:32) : in : b[i*2:2])
+  #pragma omp task depend (iterator (i = 0:32) , in : b[i*2:2])
   ;
-  #pragma omp task depend (iterator (struct S i = 0:1): in : a)		/* { dg-error "iterator 'i' has neither integral nor pointer type" } */
+  #pragma omp task depend (iterator (struct S i = 0:1), in : a)		/* { dg-error "iterator 'i' has neither integral nor pointer type" } */
   ;
-  #pragma omp task depend (iterator (void i = 0:1) : in : a)		/* { dg-error "iterator 'i' has neither integral nor pointer type" } */
+  #pragma omp task depend (iterator (void i = 0:1) , in : a)		/* { dg-error "iterator 'i' has neither integral nor pointer type" } */
   ;
-  #pragma omp task depend (iterator (float f = 0.2:0.4) : in : a)	/* { dg-error "iterator 'f' has neither integral nor pointer type" } */
+  #pragma omp task depend (iterator (float f = 0.2:0.4) , in : a)	/* { dg-error "iterator 'f' has neither integral nor pointer type" } */
   ;
-  #pragma omp task depend (iterator (struct S *p = d:e:2) : in : a)
+  #pragma omp task depend (iterator (struct S *p = d:e:2) , in : a)
   ;
-  #pragma omp task depend (iterator (struct T *p = f:g) : in : a)	/* { dg-error "invalid use of" } */
+  #pragma omp task depend (iterator (struct T *p = f:g) , in : a)	/* { dg-error "invalid use of" } */
   ;
   #pragma omp task depend (iterator (int i = 0:4, \
-				     struct U { int (*p)[i + 2]; } *p = 0:2) : in : a)	/* { dg-error "type of iterator 'p' refers to outer iterator 'i'" "" { target c } } */
+				     struct U { int (*p)[i + 2]; } *p = 0:2) , in : a)	/* { dg-error "type of iterator 'p' refers to outer iterator 'i'" "" { target c } } */
   ;									/* { dg-error "types may not be defined in iterator type|not an integer constant" "" { target c++ } .-1 } */
-  #pragma omp task depend (iterator (i = 0:4, j = i:16) : in : a)	/* { dg-error "begin expression refers to outer iterator 'i'" } */
+  #pragma omp task depend (iterator (i = 0:4, j = i:16) , in : a)	/* { dg-error "begin expression refers to outer iterator 'i'" } */
   ;
-  #pragma omp task depend (iterator (i = 0:4, j = 2:i:1) : in : a)	/* { dg-error "end expression refers to outer iterator 'i'" } */
+  #pragma omp task depend (iterator (i = 0:4, j = 2:i:1) , in : a)	/* { dg-error "end expression refers to outer iterator 'i'" } */
   ;
-  #pragma omp task depend (iterator (i = 0:4, j = 2:8:i) : in : a)	/* { dg-error "step expression refers to outer iterator 'i'" } */
+  #pragma omp task depend (iterator (i = 0:4, j = 2:8:i) , in : a)	/* { dg-error "step expression refers to outer iterator 'i'" } */
   ;
-  #pragma omp task depend (iterator (i = *d:2) : in : a)	/* { dg-error "aggregate value used where an integer was expected" "" { target c } } */
+  #pragma omp task depend (iterator (i = *d:2) , in : a)	/* { dg-error "aggregate value used where an integer was expected" "" { target c } } */
   ;								/* { dg-error "invalid cast from type 'S' to type 'int'" "" { target c++ } .-1 } */
-  #pragma omp task depend (iterator (i = 2:*d:2) : in : a)	/* { dg-error "aggregate value used where an integer was expected" "" { target c } } */
+  #pragma omp task depend (iterator (i = 2:*d:2) , in : a)	/* { dg-error "aggregate value used where an integer was expected" "" { target c } } */
   ;								/* { dg-error "invalid cast from type 'S' to type 'int'" "" { target c++ } .-1 } */
-  #pragma omp task depend (iterator (i = 2:4:*d) : in : a)	/* { dg-error "aggregate value used where an integer was expected" "" { target c } } */
+  #pragma omp task depend (iterator (i = 2:4:*d) , in : a)	/* { dg-error "aggregate value used where an integer was expected" "" { target c } } */
   ;								/* { dg-error "invalid cast from type 'S' to type 'int'" "" { target c++ } .-1 } */
 								/* { dg-error "iterator 'i' has zero step" "" { target c } .-2 } */
-  #pragma omp task depend (iterator (i = 1.25:2.5:3.5) : in : a)
+  #pragma omp task depend (iterator (i = 1.25:2.5:3.5) , in : a)
   ;
-  #pragma omp task depend (iterator (int *p = 23 : h) : in : a)
+  #pragma omp task depend (iterator (int *p = 23 : h) , in : a)
   ;
-  #pragma omp task depend (iterator (short i=1:3:0) : in : a)	/* { dg-error "iterator 'i' has zero step" } */
+  #pragma omp task depend (iterator (short i=1:3:0) , in : a)	/* { dg-error "iterator 'i' has zero step" } */
   ;
-  #pragma omp task depend (iterator (i = 1 : 3 : 3 - 3) : in : a)	/* { dg-error "iterator 'i' has zero step" } */
+  #pragma omp task depend (iterator (i = 1 : 3 : 3 - 3) , in : a)	/* { dg-error "iterator 'i' has zero step" } */
   ;
-  #pragma omp task depend (iterator (int *p = &b[6]:&b[9]:4 - 4) : in : a)	/* { dg-error "iterator 'p' has zero step" } */
+  #pragma omp task depend (iterator (int *p = &b[6]:&b[9]:4 - 4) , in : a)	/* { dg-error "iterator 'p' has zero step" } */
   ;
-  #pragma omp task depend (iterator (const int i = 0 : 2) : in : a)	/* { dg-error "const qualified" } */
+  #pragma omp task depend (iterator (const int i = 0 : 2) , in : a)	/* { dg-error "const qualified" } */
   ;
-  #pragma omp task depend (iterator (const long long unsigned i = 0 : 2) : in : a)	/* { dg-error "const qualified" } */
+  #pragma omp task depend (iterator (const long long unsigned i = 0 : 2) , in : a)	/* { dg-error "const qualified" } */
   ;
 #if !defined (__cplusplus) && __STDC_VERSION__ >= 201112L
-  #pragma omp task depend (iterator (_Atomic unsigned i = 0 : 2) : in : a)	/* { dg-error "_Atomic" "" { target c } } */
+  #pragma omp task depend (iterator (_Atomic unsigned i = 0 : 2) , in : a)	/* { dg-error "_Atomic" "" { target c } } */
   ;
 #endif
 }
@@ -83,14 +83,14 @@  f2 (void)
   for (i = 0; i < 64; i++)
     for (j = 0; j < 64; j++)
       {
-      #pragma omp ordered depend (iterator (k=0:1) : sink: i - 1, j - 1)	/* { dg-error "'iterator' modifier incompatible with 'sink'" } */
-      #pragma omp ordered depend (iterator (int l = 0:2:3) : source)		/* { dg-error "'iterator' modifier incompatible with 'source'" } */
+      #pragma omp ordered depend (iterator (k=0:1) , sink: i - 1, j - 1)	/* { dg-error "'iterator' modifier incompatible with 'sink'" } */
+      #pragma omp ordered depend (iterator (int l = 0:2:3) , source)		/* { dg-error "'iterator' modifier incompatible with 'source'" } */
       }
 }
 
 void
 f3 (void)
 {
-  #pragma omp task depend (iterator (i = 0:1): iterator (j = 0:1) : in : a)	/* { dg-error "invalid depend kind|'iterator' undeclared|was not declared|expected '\\)' before ':' token" } */
+  #pragma omp task depend (iterator (i = 0:1), iterator (j = 0:1) , in : a)	/* { dg-error "invalid depend kind" } */
   ;
 }
--- gcc/testsuite/g++.dg/gomp/depend-iterator-1.C.jj	2018-06-13 18:36:35.959238977 +0200
+++ gcc/testsuite/g++.dg/gomp/depend-iterator-1.C	2018-08-01 17:52:55.254711296 +0200
@@ -8,7 +8,7 @@  template <typename T, typename U, typena
 void
 foo (unsigned char i, signed char j)
 {
-  #pragma omp task depend (iterator (T j=6:N:-2) : out : \
+  #pragma omp task depend (iterator (T j=6:N:-2) , out : \
 	arr[TEST_EQ (sizeof (j), sizeof (int)), \
 	    TEST_EQ (sizeof (i), sizeof (unsigned char)), \
 	    TEST_EQ (sizeof (k), sizeof (struct S)), j], \
@@ -18,7 +18,7 @@  foo (unsigned char i, signed char j)
 	depend(out: arr[0]) \
 	depend (iterator (U i=__LONG_LONG_MAX__ - 4:__LONG_LONG_MAX__ - N:N, \
 			  V j=~0U-16:~0U-8:3, \
-			  W *k=&arr4[1]:&arr4[2]:1) : in : \
+			  W *k=&arr4[1]:&arr4[2]:1) , in : \
 	arr[TEST_EQ (sizeof (i), sizeof (long long)), \
 	    TEST_EQ (sizeof (j), sizeof (unsigned short)), \
 	    TEST_EQ (sizeof (k), sizeof (short *)), \
@@ -37,7 +37,7 @@  bar (unsigned char i, signed char j)
 {
   int m = j;
   int n = j + 2;
-  #pragma omp task depend (iterator (j=N:2:m) : out : \
+  #pragma omp task depend (iterator (j=N:2:m) , out : \
 	arr[TEST_EQ (sizeof (j), sizeof (int)), \
 	    TEST_EQ (sizeof (i), sizeof (unsigned char)), \
 	    TEST_EQ (sizeof (k), sizeof (struct S)), j], \
@@ -47,7 +47,7 @@  bar (unsigned char i, signed char j)
 	depend(out: arr[0]) \
 	depend (iterator (U i=__LONG_LONG_MAX__ - 4 - n:__LONG_LONG_MAX__ - 2:2, \
 			  unsigned short j=~0U-16:~0U-8-n:3, \
-			  W k=&arr4[N-5]:&arr4[n + 2]:1) : in : \
+			  W k=&arr4[N-5]:&arr4[n + 2]:1) , in : \
 	arr[TEST_EQ (sizeof (i), sizeof (long long)), \
 	    TEST_EQ (sizeof (j), sizeof (unsigned short)), \
 	    TEST_EQ (sizeof (k), sizeof (short *)), \
@@ -67,10 +67,10 @@  baz (void)
   #pragma omp parallel
   #pragma omp master
   {
-    #pragma omp task depend(iterator(T k = N : 2) : inout : \
+    #pragma omp task depend(iterator(T k = N : 2) , inout : \
 	arr[TEST_EQ (sizeof (k), sizeof (unsigned long)), \
 	    TEST_EQ (((__typeof (k)) -1) < N, 0), k]) \
-	depend(iterator(U s = -3 : -12 : -1 + N) : out : \
+	depend(iterator(U s = -3 : -12 : -1 + N) , out : \
 	arr[TEST_EQ (sizeof (s), sizeof (signed char)), \
 	    TEST_EQ (((__typeof (s)) -1) < 0, 1), s + 12])
       v++;
--- gcc/testsuite/g++.dg/gomp/depend-iterator-2.C.jj	2018-06-28 13:09:34.557143914 +0200
+++ gcc/testsuite/g++.dg/gomp/depend-iterator-2.C	2018-08-01 18:47:23.250933990 +0200
@@ -8,48 +8,48 @@  template <typename U, typename V, typena
 void
 f1 ()
 {
-  #pragma omp task depend (iterator : in : a)	// { dg-error "expected|invalid depend kind" }
+  #pragma omp task depend (iterator , in : a)	// { dg-error "expected" }
   ;
-  #pragma omp task depend (iterator (for = 0 : 2) : in : a)	// { dg-error "expected" }
+  #pragma omp task depend (iterator (for = 0 : 2) , in : a)	// { dg-error "expected" }
   ;
-  #pragma omp task depend (iterator (5 = 0 : 2) : in : a)	// { dg-error "expected" }
+  #pragma omp task depend (iterator (5 = 0 : 2) , in : a)	// { dg-error "expected" }
   ;
-  #pragma omp task depend (iterator (i : N : 2) : in : a)	// { dg-error "expected '='|name a type|expected" }
+  #pragma omp task depend (iterator (i : N : 2) , in : a)	// { dg-error "expected '='|name a type|expected" }
   ;
-  #pragma omp task depend (iterator (i = 0, 1 : 2) : in : a)	// { dg-error "expected" }
+  #pragma omp task depend (iterator (i = 0, 1 : 2) , in : a)	// { dg-error "expected" }
   ;
-  #pragma omp task depend (iterator (i = (0, 1) : 2) : in : a)
+  #pragma omp task depend (iterator (i = (0, 1) : 2) , in : a)
   ;
-  #pragma omp task depend (iterator (i = 0 : 1 : 2 : 3) : in : a)	// { dg-error "expected '.'" }
+  #pragma omp task depend (iterator (i = 0 : 1 : 2 : 3) , in : a)	// { dg-error "expected '.'" }
   ;
-  #pragma omp task depend (iterator (i = 0 : 2, 3) : in : a)	// { dg-error "expected" }
+  #pragma omp task depend (iterator (i = 0 : 2, 3) , in : a)	// { dg-error "expected" }
   ;
-  #pragma omp task depend (iterator (i = N : 10 : 2, 3) : in : a)	// { dg-error "expected" }
+  #pragma omp task depend (iterator (i = N : 10 : 2, 3) , in : a)	// { dg-error "expected" }
   ;
-  #pragma omp task depend (iterator (i = 0:1), iterator (j = 0:1) : in : a)	// { dg-error "expected ':'|invalid depend kind|was not declared|expected '\\)' before ':' token" }
+  #pragma omp task depend (iterator (i = 0:1), iterator (j = 0:1) , in : a)	// { dg-error "invalid depend kind" }
   ;
-  #pragma omp task depend (iterator (i = N:32) : in : b[i*2:2])
+  #pragma omp task depend (iterator (i = N:32) , in : b[i*2:2])
   ;
-  #pragma omp task depend (iterator (void i = 0:1) : in : a)		// { dg-error "iterator 'i' has neither integral nor pointer type" }
+  #pragma omp task depend (iterator (void i = 0:1) , in : a)		// { dg-error "iterator 'i' has neither integral nor pointer type" }
   ;
-  #pragma omp task depend (iterator (U *p = d:e:2) : in : a)
+  #pragma omp task depend (iterator (U *p = d:e:2) , in : a)
   ;
   #pragma omp task depend (iterator (W i = N:4, \
-				     struct U2 { W *p; } *p = 0:2) : in : a) // { dg-error "types may not be defined in iterator type" }
+				     struct U2 { W *p; } *p = 0:2) , in : a) // { dg-error "types may not be defined in iterator type" }
   ;
-  #pragma omp task depend (iterator (i = 0:4, j = i:16) : in : a)	// { dg-error "begin expression refers to outer iterator 'i'" }
+  #pragma omp task depend (iterator (i = 0:4, j = i:16) , in : a)	// { dg-error "begin expression refers to outer iterator 'i'" }
   ;
-  #pragma omp task depend (iterator (i = N:4, j = 2:i:1) : in : a)	// { dg-error "end expression refers to outer iterator 'i'" }
+  #pragma omp task depend (iterator (i = N:4, j = 2:i:1) , in : a)	// { dg-error "end expression refers to outer iterator 'i'" }
   ;
-  #pragma omp task depend (iterator (i = 0:4, j = 2:8:i) : in : a)	// { dg-error "step expression refers to outer iterator 'i'" }
+  #pragma omp task depend (iterator (i = 0:4, j = 2:8:i) , in : a)	// { dg-error "step expression refers to outer iterator 'i'" }
   ;
-  #pragma omp task depend (iterator (i = 1.25:2.5:3.5) : in : a)
+  #pragma omp task depend (iterator (i = 1.25:2.5:3.5) , in : a)
   ;
-  #pragma omp task depend (iterator (W *p = 23 : h) : in : a)
+  #pragma omp task depend (iterator (W *p = 23 : h) , in : a)
   ;
-  #pragma omp task depend (iterator (const int i = N : 2) : in : a)	// { dg-error "const qualified" }
+  #pragma omp task depend (iterator (const int i = N : 2) , in : a)	// { dg-error "const qualified" }
   ;
-  #pragma omp task depend (iterator (const long long unsigned i = 0 : 2) : in : a)	// { dg-error "const qualified" }
+  #pragma omp task depend (iterator (const long long unsigned i = 0 : 2) , in : a)	// { dg-error "const qualified" }
   ;
 }
 
@@ -62,8 +62,8 @@  f2 ()
   for (i = 0; i < 64; i++)
     for (j = 0; j < 64; j++)
       {
-      #pragma omp ordered depend (iterator (k=0:N) : sink: i - 1, j - 1)	// { dg-error "'iterator' modifier incompatible with 'sink'" }
-      #pragma omp ordered depend (iterator (W l = 0:2:3) : source)		// { dg-error "'iterator' modifier incompatible with 'source'" }
+      #pragma omp ordered depend (iterator (k=0:N) , sink: i - 1, j - 1)	// { dg-error "'iterator' modifier incompatible with 'sink'" }
+      #pragma omp ordered depend (iterator (W l = 0:2:3) , source)		// { dg-error "'iterator' modifier incompatible with 'source'" }
       }
 }
 
@@ -71,31 +71,31 @@  template <typename U, typename V, typena
 void
 f3 ()
 {
-  #pragma omp task depend (iterator (U i = 0:1): in : a)		// { dg-error "iterator 'i' has neither integral nor pointer type" }
+  #pragma omp task depend (iterator (U i = 0:1), in : a)		// { dg-error "iterator 'i' has neither integral nor pointer type" }
   ;
-  #pragma omp task depend (iterator (V f = 0.2:0.4) : in : a)	// { dg-error "iterator 'f' has neither integral nor pointer type" }
+  #pragma omp task depend (iterator (V f = 0.2:0.4) , in : a)	// { dg-error "iterator 'f' has neither integral nor pointer type" }
   ;
-  #pragma omp task depend (iterator (struct T *p = f:g) : in : a)	// { dg-error "invalid use of" }
+  #pragma omp task depend (iterator (struct T *p = f:g) , in : a)	// { dg-error "invalid use of" }
   ;
-  #pragma omp task depend (iterator (i = *d:2) : in : a)	// { dg-error "invalid cast from type 'S' to type 'int'" }
+  #pragma omp task depend (iterator (i = *d:2) , in : a)	// { dg-error "invalid cast from type 'S' to type 'int'" }
   ;
-  #pragma omp task depend (iterator (i = 2:*d:2) : in : a)	// { dg-error "invalid cast from type 'S' to type 'int'" }
+  #pragma omp task depend (iterator (i = 2:*d:2) , in : a)	// { dg-error "invalid cast from type 'S' to type 'int'" }
   ;
-  #pragma omp task depend (iterator (i = 2:4:*d) : in : a)	// { dg-error "invalid cast from type 'S' to type 'int'" }
+  #pragma omp task depend (iterator (i = 2:4:*d) , in : a)	// { dg-error "invalid cast from type 'S' to type 'int'" }
   ;
-  #pragma omp task depend (iterator (i = 1.25:2.5:3.5) : in : a)
+  #pragma omp task depend (iterator (i = 1.25:2.5:3.5) , in : a)
   ;
-  #pragma omp task depend (iterator (W *p = 23 : h) : in : a)
+  #pragma omp task depend (iterator (W *p = 23 : h) , in : a)
   ;
-  #pragma omp task depend (iterator (short i=1:3:N) : in : a)	// { dg-error "iterator 'i' has zero step" }
+  #pragma omp task depend (iterator (short i=1:3:N) , in : a)	// { dg-error "iterator 'i' has zero step" }
   ;
-  #pragma omp task depend (iterator (i = 1 : 3 : N + 3 - 3) : in : a)	// { dg-error "iterator 'i' has zero step" }
+  #pragma omp task depend (iterator (i = 1 : 3 : N + 3 - 3) , in : a)	// { dg-error "iterator 'i' has zero step" }
   ;
-  #pragma omp task depend (iterator (int *p = &b[6]:&b[9]:4 - 4) : in : a)	// { dg-error "iterator 'p' has zero step" }
+  #pragma omp task depend (iterator (int *p = &b[6]:&b[9]:4 - 4) , in : a)	// { dg-error "iterator 'p' has zero step" }
   ;
-  #pragma omp task depend (iterator (X i = N : 2) : in : a)	// { dg-error "const qualified" }
+  #pragma omp task depend (iterator (X i = N : 2) , in : a)	// { dg-error "const qualified" }
   ;
-  #pragma omp task depend (iterator (Y i = 0 : 2) : in : a)	// { dg-error "const qualified" }
+  #pragma omp task depend (iterator (Y i = 0 : 2) , in : a)	// { dg-error "const qualified" }
   ;
 }
 
@@ -103,7 +103,7 @@  template <int N>
 void
 f4 ()
 {
-  #pragma omp task depend (iterator (i = 0:1): iterator (j = 0:1) : in : a)	// { dg-error "invalid depend kind|was not declared|expected '\\)' before ':' token" }
+  #pragma omp task depend (iterator (i = 0:1), iterator (j = 0:1) , in : a)	// { dg-error "invalid depend kind" }
   ;
 }
 
--- gcc/testsuite/g++.dg/gomp/depobj-1.C.jj	2018-06-28 14:43:21.164853650 +0200
+++ gcc/testsuite/g++.dg/gomp/depobj-1.C	2018-08-01 18:50:56.669784456 +0200
@@ -15,10 +15,10 @@  f1 (bool x)
 {
   #pragma omp depobj(x ? depobj : depobj4) depend(in : x ? a : b)
   #pragma omp depobj(x ? depobj : depobj4) update(inout)
-  #pragma omp task depend (depobj)
+  #pragma omp task depend (depobj:depobj)
   ;
   #pragma omp depobj(depobj) destroy
-  #pragma omp task depend (iterator (i=1:3) : *(depobja + i))
+  #pragma omp task depend (iterator (i=1:3) , depobj: *(depobja + i))
   ;
   #pragma omp depobj(pdepobj[0]) depend(mutexinoutset:a)
   #pragma omp depobj(*pdepobj) destroy
@@ -32,24 +32,24 @@  f2 (T &depobj2, T2 depobj3, T *pdepobj)
   T depobja[4];
   #pragma omp depobj(depobj1) depend(in : --a)
   #pragma omp depobj(depobj1) update(inout)
-  #pragma omp task depend (depobj1)
+  #pragma omp task depend (depobj: depobj1)
   ;
   #pragma omp depobj(depobj1) destroy
   #pragma omp depobj(depobj2) depend(in : a)
   #pragma omp depobj(depobj2) update(inout)
-  #pragma omp task depend (depobj2)
+  #pragma omp task depend (depobj :depobj2)
   ;
   #pragma omp depobj(depobj2) destroy
   #pragma omp depobj(depobj3) depend(in : a)
   #pragma omp depobj(depobj3) update(inout)
-  #pragma omp task depend (depobj3)
+  #pragma omp task depend (depobj  :  depobj3)
   ;
   #pragma omp depobj(depobj3) destroy
   for (int q = 1; q < 3; q++)
     {
       #pragma omp depobj(depobja[q]) depend (in:a)
     }
-  #pragma omp task depend (iterator (i=1:3) : *(depobja + i))
+  #pragma omp task depend (iterator (i=1:3) , depobj : *(depobja + i))
   ;
   for (int q = 1; q < 3; q++)
     {
@@ -81,7 +81,8 @@  f4 (void)
   #pragma omp depobj (depobjb) depend(in: a)		// { dg-error "type of 'depobj' expression is not 'omp_depend_t'" }
   #pragma omp depobj (pdepobj) depend(in: a)		// { dg-error "type of 'depobj' expression is not 'omp_depend_t'" }
   #pragma omp depobj (a) destroy			// { dg-error "type of 'depobj' expression is not 'omp_depend_t'" }
-  #pragma omp depobj (depobj) depend(a)			// { dg-error "does not have 'omp_depend_t' type in 'depend' clause without dependence type" }
+  #pragma omp depobj (depobj) depend(depobj:a)		// { dg-error "does not have 'omp_depend_t' type in 'depend' clause with 'depobj' dependence type" }
+  #pragma omp depobj (depobj) depend(depobj:*depobjb)	// { dg-error "'depobj' dependence type specified in 'depend' clause on 'depobj' construct" }
   #pragma omp depobj (depobj) update(foobar)		// { dg-error "expected 'in', 'out', 'inout' or 'mutexinoutset'" }
   #pragma omp depobj (depobj) depend(in: *depobja)	// { dg-error "should not have 'omp_depend_t' type in 'depend' clause with dependence type" }
   #pragma omp depobj (depobj) depend(in: a) depend(in: b)	// { dg-error "expected" }
@@ -89,7 +90,7 @@  f4 (void)
   #pragma omp depobj (depobj) depend(in: a, b)		// { dg-error "more than one locator in 'depend' clause on 'depobj' construct" }
   #pragma omp depobj (depobj) depend(source)		// { dg-error "'depend\\(source\\)' is only allowed in 'omp ordered'" }
   #pragma omp depobj (depobj) depend(sink: i + 1, j - 1)	// { dg-error "'depend\\(sink\\)' is only allowed in 'omp ordered'" }
-  #pragma omp depobj (depobj) depend(iterator (i = 0:2) : in : a)	// { dg-error "'iterator' modifier may not be specified on 'depobj' construct" }
+  #pragma omp depobj (depobj) depend(iterator (i = 0:2) , in : a)	// { dg-error "'iterator' modifier may not be specified on 'depobj' construct" }
   if (0)
     #pragma omp depobj (depobj) destroy			// { dg-error "'#pragma omp depobj' may only be used in compound statements" }
     ;
@@ -99,9 +100,9 @@  template <int N>
 void
 f5 (void)
 {
-  #pragma omp task depend (depobja[1:2])		// { dg-error "'depend' clause without dependence type on array section" }
+  #pragma omp task depend (depobj:depobja[1:2])		// { dg-error "'depend' clause with 'depobj' dependence type on array section" }
   ;
-  #pragma omp task depend (a)				// { dg-error "'a' does not have 'omp_depend_t' type in 'depend' clause without dependence type" }
+  #pragma omp task depend (depobj : a)			// { dg-error "'a' does not have 'omp_depend_t' type in 'depend' clause with 'depobj' dependence type" }
   ;
   #pragma omp task depend (in: depobj)			// { dg-error "'depobj' should not have 'omp_depend_t' type in 'depend' clause with dependence type" }
   ;
--- libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c.jj	2018-06-12 14:39:09.759522148 +0200
+++ libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c	2018-08-01 18:03:26.037649407 +0200
@@ -57,16 +57,16 @@  main ()
   {
     int i;
     for (i = 0; i < 64; i++)
-      #pragma omp task depend (iterator (j=i:i+1) : out : foo (1, j, 0)[0])
+      #pragma omp task depend (iterator (j=i:i+1) , out : foo (1, j, 0)[0])
 	arr[i] = i;
-    #pragma omp task depend (iterator (int k=beg:end:step,long int l=0:4:1) : inout : \
+    #pragma omp task depend (iterator (int k=beg:end:step,long int l=0:4:1) , inout : \
 			     foo (2, k, l)[0], foo (3, l, k)[0]) private (i)
     for (i = 0; i < 64; i++)
       if (arr[i] != i)
 	abort ();
       else
 	arr[i] = arr[i] + 1;
-    #pragma omp task depend (iterator (int *p=&arr3[64]:&arr3[0]:-1) : in : \
+    #pragma omp task depend (iterator (int *p=&arr3[64]:&arr3[0]:-1) , in : \
 			     foo (4, 0, p - &arr3[0])[0]) depend (in : beg)
     for (i = 0; i < 64; i++)
       if (arr[i] != i + 1)
--- libgomp/testsuite/libgomp.c-c++-common/depend-iterator-2.c.jj	2018-06-27 11:45:24.525508965 +0200
+++ libgomp/testsuite/libgomp.c-c++-common/depend-iterator-2.c	2018-08-01 18:03:50.780725430 +0200
@@ -19,37 +19,37 @@  foo (int *p, int i)
   v++;
   #pragma omp task depend (mutexinoutset: p[0]) depend (out: p[1])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : out : p[j])
+  #pragma omp task depend (iterator (j=0:2) , out : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : in : p[j])
+  #pragma omp task depend (iterator (j=0:2) , in : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : inout : p[j])
+  #pragma omp task depend (iterator (j=0:2) , inout : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : mutexinoutset : p[j])
+  #pragma omp task depend (iterator (j=0:2) , mutexinoutset : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : out : p[j]) depend (iterator (j=0:2) : in : p[j + 2])
+  #pragma omp task depend (iterator (j=0:2) , out : p[j]) depend (iterator (j=0:2) , in : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : in : p[j]) depend (iterator (j=0:2) : inout : p[j + 2])
+  #pragma omp task depend (iterator (j=0:2) , in : p[j]) depend (iterator (j=0:2) , inout : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : inout : p[j]) depend (iterator (j=0:2) : mutexinoutset : p[j + 2])
+  #pragma omp task depend (iterator (j=0:2) , inout : p[j]) depend (iterator (j=0:2) , mutexinoutset : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:2) : mutexinoutset : p[j]) depend (iterator (j=0:2) : out : p[j + 2])
+  #pragma omp task depend (iterator (j=0:2) , mutexinoutset : p[j]) depend (iterator (j=0:2) , out : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : out : p[j])
+  #pragma omp task depend (iterator (j=0:i) , out : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : in : p[j])
+  #pragma omp task depend (iterator (j=0:i) , in : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : inout : p[j])
+  #pragma omp task depend (iterator (j=0:i) , inout : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : mutexinoutset : p[j])
+  #pragma omp task depend (iterator (j=0:i) , mutexinoutset : p[j])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : out : p[j]) depend (iterator (j=0:i) : in : p[j + 2])
+  #pragma omp task depend (iterator (j=0:i) , out : p[j]) depend (iterator (j=0:i) , in : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : in : p[j]) depend (iterator (j=0:i) : inout : p[j + 2])
+  #pragma omp task depend (iterator (j=0:i) , in : p[j]) depend (iterator (j=0:i) , inout : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : inout : p[j]) depend (iterator (j=0:i) : mutexinoutset : p[j + 2])
+  #pragma omp task depend (iterator (j=0:i) , inout : p[j]) depend (iterator (j=0:i) , mutexinoutset : p[j + 2])
   v++;
-  #pragma omp task depend (iterator (j=0:i) : mutexinoutset : p[j]) depend (iterator (j=0:i) : out : p[j + 2])
+  #pragma omp task depend (iterator (j=0:i) , mutexinoutset : p[j]) depend (iterator (j=0:i) , out : p[j + 2])
   v++;
 }
 
--- libgomp/testsuite/libgomp.c-c++-common/depobj-1.c.jj	2018-06-27 15:47:09.637231807 +0200
+++ libgomp/testsuite/libgomp.c-c++-common/depobj-1.c	2018-08-01 18:04:56.780928222 +0200
@@ -12,9 +12,9 @@  dep (void)
   #pragma omp parallel
   #pragma omp single
   {
-    #pragma omp task shared (x) depend(d2)
+    #pragma omp task shared (x) depend(depobj: d2)
     x = 2;
-    #pragma omp task shared (x) depend(d1)
+    #pragma omp task shared (x) depend(depobj: d1)
     if (x != 2)
       abort ();
   }
@@ -33,9 +33,9 @@  dep2 (void)
     #pragma omp depobj (d1) depend(out: x)
     #pragma omp depobj (*&d2) depend (in:x)
     #pragma omp depobj(d2)update(in)
-    #pragma omp task shared (x) depend(d1)
+    #pragma omp task shared (x) depend(depobj:d1)
     x = 2;
-    #pragma omp task shared (x) depend(d2)
+    #pragma omp task shared (x) depend(depobj : d2)
     if (x != 2)
       abort ();
     #pragma omp taskwait
@@ -55,9 +55,9 @@  dep3 (void)
     {
       #pragma omp depobj(d[0]) depend(out:x)
       #pragma omp depobj(d[1]) depend(in: x)
-      #pragma omp task shared (x) depend(*d)
+      #pragma omp task shared (x) depend(depobj: *d)
       x = 2;
-      #pragma omp task shared (x) depend(*(d + 1))
+      #pragma omp task shared (x) depend(depobj: *(d + 1))
       if (x != 2)
 	abort ();
     }
@@ -76,10 +76,10 @@  antidep (void)
   #pragma omp parallel
   #pragma omp single
   {
-    #pragma omp task shared(xx) depend(dd2)
+    #pragma omp task shared(xx) depend(depobj:dd2)
     if (xx != 1)
       abort ();
-    #pragma omp task shared(xx) depend(dd1)
+    #pragma omp task shared(xx) depend(depobj:dd1)
     xx = 2;
   }
 }
--- libgomp/testsuite/libgomp.c++/depend-iterator-1.C.jj	2018-06-13 18:07:09.183618914 +0200
+++ libgomp/testsuite/libgomp.c++/depend-iterator-1.C	2018-08-01 18:05:47.080082763 +0200
@@ -51,16 +51,16 @@  bar ()
   {
     int i;
     for (i = 0; i < 64; i++)
-      #pragma omp task depend (iterator (j=i:i+1) : out : foo (1, j, 0)[0])
+      #pragma omp task depend (iterator (j=i:i+1) , out : foo (1, j, 0)[0])
 	arr[i] = i;
-    #pragma omp task depend (iterator (int k=beg:end:step,long int l=0:4:1) : inout : \
+    #pragma omp task depend (iterator (int k=beg:end:step,long int l=0:4:1) , inout : \
 			     foo (2, k, l)[0], foo (3, l, k)[0]) private (i)
     for (i = 0; i < 64; i++)
       if (arr[i] != i)
 	abort ();
       else
 	arr[i] = arr[i] + 1;
-    #pragma omp task depend (iterator (int *p=&arr3[64]:&arr3[0]:-1) : in : \
+    #pragma omp task depend (iterator (int *p=&arr3[64]:&arr3[0]:-1), in : \
 			     foo (4, 0, p - &arr3[0])[0]) depend (in : beg)
     for (i = 0; i < 64; i++)
       if (arr[i] != i + 1)
@@ -79,16 +79,16 @@  baz (A beg, A end, A step)
   {
     int i;
     for (i = 0; i < 64; i++)
-      #pragma omp task depend (iterator (A j=i:i+1) : out : foo (1, j, 0)[0])
+      #pragma omp task depend (iterator (A j=i:i+1),out : foo (1, j, 0)[0])
 	arr[i] = i;
-    #pragma omp task depend (iterator (A k=beg:end:step,B l=0:4:1) : inout : \
+    #pragma omp task depend (iterator (A k=beg:end:step,B l=0:4:1), inout : \
 			     foo (2, k, l)[0], foo (3, l, k)[0]) private (i)
     for (i = 0; i < 64; i++)
       if (arr[i] != i)
 	abort ();
       else
 	arr[i] = arr[i] + 1;
-    #pragma omp task depend (iterator (C p=&arr3[64]:&arr3[0]:-1) : in : \
+    #pragma omp task depend (iterator (C p=&arr3[64]:&arr3[0]:-1), in : \
 			     foo (4, 0, p - &arr3[0])[0]) depend (in : beg)
     for (i = 0; i < 64; i++)
       if (arr[i] != i + 1)
--- libgomp/testsuite/libgomp.c++/depobj-1.C.jj	2018-06-28 15:38:44.035632853 +0200
+++ libgomp/testsuite/libgomp.c++/depobj-1.C	2018-08-01 19:04:43.166439001 +0200
@@ -12,9 +12,9 @@  dep (omp_depend_t &d1, omp_depend_t *d2)
   #pragma omp parallel
   #pragma omp single
   {
-    #pragma omp task shared (x) depend(*d2)
+    #pragma omp task shared (x) depend(depobj:*d2)
     x = 2;
-    #pragma omp task shared (x) depend(d1)
+    #pragma omp task shared (x) depend(depobj : d1)
     if (x != 2)
       abort ();
   }
@@ -34,9 +34,9 @@  dep2 (T &d2)
     #pragma omp depobj (d1) depend(out: x)
     #pragma omp depobj (*&d2) depend (in:x)
     #pragma omp depobj(d2)update(in)
-    #pragma omp task shared (x) depend(d1)
+    #pragma omp task shared (x) depend(depobj :d1)
     x = 2;
-    #pragma omp task shared (x) depend(d2)
+    #pragma omp task shared (x) depend(depobj: d2)
     if (x != 2)
       abort ();
     #pragma omp taskwait
@@ -57,9 +57,9 @@  dep3 (void)
     {
       #pragma omp depobj(d[0]) depend(out:x)
       #pragma omp depobj(d[1]) depend(in: x)
-      #pragma omp task shared (x) depend(*d)
+      #pragma omp task shared (x) depend(depobj:*d)
       x = 2;
-      #pragma omp task shared (x) depend(*(d + 1))
+      #pragma omp task shared (x) depend(depobj:*(d + 1))
       if (x != 2)
 	abort ();
     }
@@ -79,10 +79,10 @@  antidep (void)
   #pragma omp parallel
   #pragma omp single
   {
-    #pragma omp task shared(xx) depend(dd2)
+    #pragma omp task shared(xx) depend(depobj:dd2)
     if (xx != 1)
       abort ();
-    #pragma omp task shared(xx) depend(dd1)
+    #pragma omp task shared(xx) depend(depobj:dd1)
     xx = 2;
   }
 }