Hi Thomas!

This patch is pretty obvious. Currently ASYNC clause cannot have integer-expression-list. Patch fixes this.

OK for gomp4 branch?

--
Ilmir.
>From df76a29ebf869687209d7a606e243624cc136dbc Mon Sep 17 00:00:00 2001
From: Ilmir Usmanov <i.usma...@samsung.com>
Date: Wed, 26 Feb 2014 19:04:47 +0400
Subject: [PATCH 4/5] Fix ASYNC

---
 gcc/gimplify.c  | 4 ++--
 gcc/omp-low.c   | 4 ++--
 gcc/tree-core.h | 6 +++---
 gcc/tree.c      | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index fd4305c..ce2f6a4 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6186,10 +6186,10 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
 	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_USE_DEVICE:
 	case OMP_CLAUSE_GANG:
+	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WAIT:
 	case OMP_NO_CLAUSE_CACHE:
 	case OMP_CLAUSE_INDEPENDENT:
-	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WORKER:
 	case OMP_CLAUSE_VECTOR:
 	case OMP_CLAUSE_NUM_GANGS:
@@ -6545,11 +6545,11 @@ gimplify_adjust_omp_clauses (tree *list_p)
 	case OMP_CLAUSE_OACC_DEVICE:
 	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_USE_DEVICE:
+	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_GANG:
 	case OMP_CLAUSE_WAIT:
 	case OMP_NO_CLAUSE_CACHE:
 	case OMP_CLAUSE_INDEPENDENT:
-	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WORKER:
 	case OMP_CLAUSE_VECTOR:
 	case OMP_CLAUSE_NUM_GANGS:
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 6dec687..eec862e 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1776,10 +1776,10 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
 	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_USE_DEVICE:
 	case OMP_CLAUSE_GANG:
+	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WAIT:
 	case OMP_NO_CLAUSE_CACHE:
 	case OMP_CLAUSE_INDEPENDENT:
-	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WORKER:
 	case OMP_CLAUSE_VECTOR:
 	case OMP_CLAUSE_NUM_GANGS:
@@ -1916,10 +1916,10 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
 	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_USE_DEVICE:
 	case OMP_CLAUSE_GANG:
+	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WAIT:
 	case OMP_NO_CLAUSE_CACHE:
 	case OMP_CLAUSE_INDEPENDENT:
-	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WORKER:
 	case OMP_CLAUSE_VECTOR:
 	case OMP_CLAUSE_NUM_GANGS:
diff --git a/gcc/tree-core.h b/gcc/tree-core.h
index fcdeb44..e9aeb65 100644
--- a/gcc/tree-core.h
+++ b/gcc/tree-core.h
@@ -286,6 +286,9 @@ enum omp_clause_code {
       size-expression: * | integer-expression.  */
   OMP_CLAUSE_GANG,
 
+  /* OpenACC clause: async [(integer-expression)].  */
+  OMP_CLAUSE_ASYNC,
+
   /* OpenACC clause/directive: wait [(integer-expression-list)].  */
   OMP_CLAUSE_WAIT,
 
@@ -372,9 +375,6 @@ enum omp_clause_code {
   /* OpenACC clause: independent.  */
   OMP_CLAUSE_INDEPENDENT,
 
-  /* OpenACC clause: async [(integer-expression)].  */
-  OMP_CLAUSE_ASYNC,
-
   /* OpenACC clause: worker [( [num:] integer-expression)].  */
   OMP_CLAUSE_WORKER,
 
diff --git a/gcc/tree.c b/gcc/tree.c
index 0655db0..7d4805e 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -263,6 +263,7 @@ unsigned const char omp_clause_num_ops[] =
   1, /* OMP_CLAUSE_OACC_DEVICE  */
   1, /* OMP_CLAUSE_DEVICE_RESIDENT  */
   1, /* OMP_CLAUSE_USE_DEVICE  */
+  1, /* OMP_CLAUSE_ASYNC  */
   1, /* OMP_CLAUSE_GANG  */
   1, /* OMP_CLAUSE_WAIT  */
   1, /* OMP_NO_CLAUSE_CACHE  */
@@ -292,7 +293,6 @@ unsigned const char omp_clause_num_ops[] =
   0, /* OMP_CLAUSE_TASKGROUP  */
   1, /* OMP_CLAUSE__SIMDUID_  */
   0, /* OMP_CLAUSE_INDEPENDENT  */
-  1, /* OMP_CLAUSE_ASYNC  */
   1, /* OMP_CLAUSE_WORKER  */
   1, /* OMP_CLAUSE_VECTOR  */
   1, /* OMP_CLAUSE_NUM_GANGS  */
@@ -322,6 +322,7 @@ const char * const omp_clause_code_name[] =
   "device_resident",
   "use_device",
   "gang",
+  "async",
   "wait",
   "_cache_",
   "_looptemp_",
@@ -350,7 +351,6 @@ const char * const omp_clause_code_name[] =
   "taskgroup",
   "_simduid_",
   "independent",
-  "async",
   "worker",
   "vector",
   "num_gangs",
@@ -11062,9 +11062,9 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data,
 	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_USE_DEVICE:
 	case OMP_CLAUSE_GANG:
+	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WAIT:
 	case OMP_NO_CLAUSE_CACHE:
-	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WORKER:
 	case OMP_CLAUSE_VECTOR:
 	case OMP_CLAUSE_NUM_GANGS:
-- 
1.8.3.2

Reply via email to