case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
case GF_OMP_TARGET_KIND_OACC_DECLARE:
- /* ..., other than for those stand-alone directives... */
+ /* ..., other than for those stand-alone directives...
+ To be precise, target data isn't stand-alone, but
+ gimplifier put the end API call into try finally block
+ for it, so omp expansion can treat it as such. */
region = NULL;
break;
default:
&& gimple_omp_task_taskwait_p (stmt))
/* #pragma omp taskwait depend(...) is a stand-alone directive. */
region = NULL;
+ else if (code == GIMPLE_OMP_TASKGROUP)
+ /* #pragma omp taskgroup isn't a stand-alone directive, but
+ gimplifier put the end API call into try finall block
+ for it, so omp expansion can treat it as such. */
+ region = NULL;
/* ..., this directive becomes the parent for a new region. */
if (region)
parent = region;
case GIMPLE_OMP_SINGLE:
case GIMPLE_OMP_TEAMS:
case GIMPLE_OMP_MASTER:
- case GIMPLE_OMP_TASKGROUP:
case GIMPLE_OMP_CRITICAL:
case GIMPLE_OMP_SECTION:
case GIMPLE_OMP_GRID_BODY:
fallthru = true;
break;
+ case GIMPLE_OMP_TASKGROUP:
+ cur_region = new_omp_region (bb, code, cur_region);
+ fallthru = true;
+ cur_region = cur_region->outer;
+ break;
+
case GIMPLE_OMP_TASK:
cur_region = new_omp_region (bb, code, cur_region);
fallthru = true;
gimple_bind_add_seq (bind, gimple_omp_body (stmt));
gimple_omp_set_body (stmt, NULL);
- gimple_bind_add_stmt (bind, gimple_build_omp_return (true));
gimple_bind_add_seq (bind, dseq);
pop_gimplify_context (bind);