aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c60
1 files changed, 42 insertions, 18 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 812f619..62cb01f 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1203,17 +1203,29 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
case OMP_CLAUSE_AUTO:
break;
+ /* OpenACC tile clauses are discarded during gimplification. */
case OMP_CLAUSE_TILE:
- /* OpenACC tile clauses are discarded during gimplification, so we
- don't expect to see anything here. */
- gcc_unreachable ();
-
+ /* The following clause belongs to the OpenACC cache directive, which
+ is discarded during gimplification. */
case OMP_CLAUSE__CACHE_:
- /* These clauses belong to the OpenACC cache directive, which is
- discarded during gimplification, so we don't expect to see
- anything here. */
- gcc_unreachable ();
-
+ /* The following clauses are only allowed in the OpenMP declare simd
+ directive, so not seen here. */
+ case OMP_CLAUSE_UNIFORM:
+ case OMP_CLAUSE_INBRANCH:
+ case OMP_CLAUSE_NOTINBRANCH:
+ /* The following clauses are only allowed on OpenMP cancel and
+ cancellation point directives, which at this point have already
+ been lowered into a function call. */
+ case OMP_CLAUSE_FOR:
+ case OMP_CLAUSE_PARALLEL:
+ case OMP_CLAUSE_SECTIONS:
+ case OMP_CLAUSE_TASKGROUP:
+ /* The following clauses are only added during OMP lowering; nested
+ function decomposition happens before that. */
+ case OMP_CLAUSE__LOOPTEMP_:
+ case OMP_CLAUSE__SIMDUID_:
+ case OMP_CLAUSE__GRIDDIM_:
+ /* Anything else. */
default:
gcc_unreachable ();
}
@@ -1899,17 +1911,29 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
case OMP_CLAUSE_AUTO:
break;
+ /* OpenACC tile clauses are discarded during gimplification. */
case OMP_CLAUSE_TILE:
- /* OpenACC tile clauses are discarded during gimplification, so we
- don't expect to see anything here. */
- gcc_unreachable ();
-
+ /* The following clause belongs to the OpenACC cache directive, which
+ is discarded during gimplification. */
case OMP_CLAUSE__CACHE_:
- /* These clauses belong to the OpenACC cache directive, which is
- discarded during gimplification, so we don't expect to see
- anything here. */
- gcc_unreachable ();
-
+ /* The following clauses are only allowed in the OpenMP declare simd
+ directive, so not seen here. */
+ case OMP_CLAUSE_UNIFORM:
+ case OMP_CLAUSE_INBRANCH:
+ case OMP_CLAUSE_NOTINBRANCH:
+ /* The following clauses are only allowed on OpenMP cancel and
+ cancellation point directives, which at this point have already
+ been lowered into a function call. */
+ case OMP_CLAUSE_FOR:
+ case OMP_CLAUSE_PARALLEL:
+ case OMP_CLAUSE_SECTIONS:
+ case OMP_CLAUSE_TASKGROUP:
+ /* The following clauses are only added during OMP lowering; nested
+ function decomposition happens before that. */
+ case OMP_CLAUSE__LOOPTEMP_:
+ case OMP_CLAUSE__SIMDUID_:
+ case OMP_CLAUSE__GRIDDIM_:
+ /* Anything else. */
default:
gcc_unreachable ();
}