Add a few asserts to nvptx_goacc_validate_dims.
2019-01-07 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Add asserts.
From-SVN: r267625
+2019-01-07 Tom de Vries <tdevries@suse.de>
+
+ * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Add asserts.
+
2019-01-07 Tom de Vries <tdevries@suse.de>
* omp-offload.c (oacc_get_min_dim): New function.
nvptx_goacc_validate_dims_1 (decl, dims, fn_level);
+ gcc_assert (dims[GOMP_DIM_VECTOR] != 0);
+ if (dims[GOMP_DIM_WORKER] > 0 && dims[GOMP_DIM_VECTOR] > 0)
+ gcc_assert (dims[GOMP_DIM_WORKER] * dims[GOMP_DIM_VECTOR] <= PTX_CTA_SIZE);
+
for (i = 0; i < GOMP_DIM_MAX; ++i)
if (old_dims[i] != dims[i])
return true;