[OpenACC] update fortran nested parallelism error messages

gcc/fortran/
	* openmp.c (resolve_oacc_loop_blocks):

	gcc/testsuite/
	* gfortran.dg/goacc/nested-parallelism.f90: New test.

From-SVN: r264536
This commit is contained in:
Cesar Philippidis 2018-09-24 07:51:25 -07:00
parent f80316c5d7
commit 9a51c0cc2a
4 changed files with 61 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
Cesar Philippidis <cesar@codesourcery.com>
* openmp.c (resolve_oacc_loop_blocks):
2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87397

View File

@ -5853,7 +5853,7 @@ resolve_oacc_loop_blocks (gfc_code *code)
&code->loc);
if (c->code->ext.omp_clauses->vector)
gfc_error ("Loop parallelized across gangs is not allowed "
"inside loop parallelized across workers at %L",
"inside loop parallelized across vectors at %L",
&code->loc);
}
if (code->ext.omp_clauses->worker)

View File

@ -1,3 +1,7 @@
2018-09-24 Cesar Philippidis <cesar@codesourcery.com>
* gfortran.dg/goacc/nested-parallelism.f90: New test.
2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/80080

View File

@ -0,0 +1,51 @@
! Verify the invalid gang, worker, vector parallelism error messages.
program np
integer, parameter :: n = 100
integer :: i, j, k
!$acc parallel loop gang
do i = 1, n
!$acc loop gang ! { dg-error "gangs is not allowed inside another loop parallelized across gangs" }
do j = 1, n
end do
!$acc loop worker
do j = 1, n
end do
!$acc loop vector
do j = 1, n
end do
end do
!$acc parallel loop worker
do i = 1, n
!$acc loop gang ! { dg-error "gangs is not allowed inside loop parallelized across workers" }
do j = 1, n
end do
!$acc loop worker ! { dg-error "workers is not allowed inside another loop parallelized across workers" }
do j = 1, n
end do
!$acc loop vector
do j = 1, n
end do
end do
!$acc parallel loop vector
do i = 1, n
!$acc loop gang ! { dg-error "gangs is not allowed inside loop parallelized across vectors" }
do j = 1, n
end do
!$acc loop worker ! { dg-error "workers is not allowed inside another loop parallelized across vectors" }
do j = 1, n
end do
!$acc loop vector ! { dg-error "vectors is not allowed inside another loop parallelized across vectors" }
do j = 1, n
end do
end do
end program np