PR fortran/92756
* omp-low.c (check_omp_nesting_restrictions): If lang_GNU_Fortran,
diagnose teams not closely nested inside of target.
Backported from mainline
2019-12-04 Jakub Jelinek <jakub@redhat.com>
PR fortran/92756
* gfortran.dg/gomp/teams1.f90: New test.
From-SVN: r279666
2019-12-20 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/92756
+ * omp-low.c (check_omp_nesting_restrictions): If lang_GNU_Fortran,
+ diagnose teams not closely nested inside of target.
+
Backported from mainline
2019-11-27 Jakub Jelinek <jakub@redhat.com>
}
break;
case GIMPLE_OMP_TEAMS:
+ if ((ctx == NULL
+ || gimple_code (ctx->stmt) != GIMPLE_OMP_TARGET
+ || gimple_omp_target_kind (ctx->stmt) != GF_OMP_TARGET_KIND_REGION)
+ && lang_GNU_Fortran ())
+ {
+ error_at (gimple_location (stmt),
+ "%<teams%> construct not closely nested inside of "
+ "%<target%> construct");
+ return false;
+ }
if (ctx == NULL)
break;
else if (gimple_code (ctx->stmt) != GIMPLE_OMP_TARGET
2019-12-20 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2019-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/92756
+ * gfortran.dg/gomp/teams1.f90: New test.
+
2019-12-03 Jakub Jelinek <jakub@redhat.com>
PR c++/92732
--- /dev/null
+! PR fortran/92756
+
+program pr92756
+ integer :: i
+ !$omp teams distribute parallel do ! { dg-error "'teams' construct not closely nested inside of 'target' construct" }
+ do i = 1, 64
+ end do
+end