@@ -5231,6 +5231,9 @@ parse_omp_structured_block (gfc_statemen
case ST_OMP_TARGET_DATA:
omp_end_st = ST_OMP_END_TARGET_DATA;
break;
+ case ST_OMP_TARGET_PARALLEL:
+ omp_end_st = ST_OMP_END_TARGET_PARALLEL;
+ break;
case ST_OMP_TARGET_TEAMS:
omp_end_st = ST_OMP_END_TARGET_TEAMS;
break;
@@ -5357,6 +5357,7 @@ gfc_trans_omp_target (gfc_code *code)
{
stmtblock_t iblock;
+ pushlevel ();
gfc_start_block (&iblock);
tree inner_clauses
= gfc_trans_omp_clauses (&block, &clausesa[GFC_OMP_SPLIT_PARALLEL],
@@ -0,0 +1,4 @@
+!$omp target parallel
+ print *, 'Hello, world'
+!$omp end target parallel
+end
@@ -68,8 +68,8 @@
!$omp target exit data map(from: x) ! { dg-error "OMP TARGET EXIT DATA directive cannot be specified within" }
!$acc end kernels
!$acc kernels
-!!$omp target parallel
-!!$omp end target parallel
+!$omp target parallel ! { dg-error "OMP TARGET PARALLEL directive cannot be specified within" }
+!$omp end target parallel
!$acc end kernels
!$acc kernels
!$omp target parallel do ! { dg-error "OMP TARGET PARALLEL DO directive cannot be specified within" }