As users are allowed to explicitly parallelize loops inside kernels regions, there's no reason to not allow such partitioning to select a non-unity default dimension.

Applied to gomp4 branch

nathan
2016-01-07  Nathan Sidwell  <nat...@acm.org>

	* omp-low.c (oacc_validate_dims): Allow non-unity defaults on
	kernel regions too.

Index: gcc/omp-low.c
===================================================================
--- gcc/omp-low.c	(revision 232136)
+++ gcc/omp-low.c	(working copy)
@@ -19370,7 +19370,7 @@ oacc_validate_dims (tree fn, tree attrs,
 	   execution doesn't have the same impact as gang-redundant
 	   execution.  (If the minimum gang-level partioning is not 1,
 	   the target is probably too confusing.)  */
-	dims[ix] = (!is_kernel && (used & (GOMP_DIM_MASK (ix)))
+	dims[ix] = (used & GOMP_DIM_MASK (ix)
 		    ? oacc_default_dims[ix] : oacc_min_dims[ix]);
 	changed = true;
       }

Reply via email to