mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 18:31:22 +08:00
openmp: Handle rest of EXEC_OACC_* in oacc_code_to_statement [PR93463]
As the testcase shows, some EXEC_OACC_* codes weren't handled in oacc_code_to_statement. Fixed thusly. 2020-01-29 Jakub Jelinek <jakub@redhat.com> PR fortran/93463 * openmp.c (oacc_code_to_statement): Handle EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}. * gfortran.dg/goacc/pr93463.f90: New test.
This commit is contained in:
parent
7892ff37f4
commit
aa1b56967d
@ -1,3 +1,9 @@
|
||||
2020-01-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/93463
|
||||
* openmp.c (oacc_code_to_statement): Handle
|
||||
EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
|
||||
|
||||
2020-01-28 Andrew Benson <abensonca@gmail.com>
|
||||
|
||||
PR fortran/93461
|
||||
|
@ -6021,6 +6021,20 @@ oacc_code_to_statement (gfc_code *code)
|
||||
return ST_OACC_LOOP;
|
||||
case EXEC_OACC_ATOMIC:
|
||||
return ST_OACC_ATOMIC;
|
||||
case EXEC_OACC_ROUTINE:
|
||||
return ST_OACC_ROUTINE;
|
||||
case EXEC_OACC_UPDATE:
|
||||
return ST_OACC_UPDATE;
|
||||
case EXEC_OACC_WAIT:
|
||||
return ST_OACC_WAIT;
|
||||
case EXEC_OACC_CACHE:
|
||||
return ST_OACC_CACHE;
|
||||
case EXEC_OACC_ENTER_DATA:
|
||||
return ST_OACC_ENTER_DATA;
|
||||
case EXEC_OACC_EXIT_DATA:
|
||||
return ST_OACC_EXIT_DATA;
|
||||
case EXEC_OACC_DECLARE:
|
||||
return ST_OACC_DECLARE;
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2020-01-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/93463
|
||||
* gfortran.dg/goacc/pr93463.f90: New test.
|
||||
|
||||
2020-01-29 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/93428
|
||||
|
15
gcc/testsuite/gfortran.dg/goacc/pr93463.f90
Normal file
15
gcc/testsuite/gfortran.dg/goacc/pr93463.f90
Normal file
@ -0,0 +1,15 @@
|
||||
! PR fortran/93463
|
||||
! { dg-do compile { target fopenmp } }
|
||||
! { dg-additional-options "-fopenmp" }
|
||||
|
||||
program pr93463
|
||||
integer :: i, x, y, z
|
||||
!$omp parallel do
|
||||
do i = 1, 4
|
||||
!$acc enter data create(x) ! { dg-error "ACC ENTER DATA directive cannot be specified within" }
|
||||
!$acc exit data copyout(x) ! { dg-error "ACC EXIT DATA directive cannot be specified within" }
|
||||
!$acc cache(y) ! { dg-error "ACC CACHE directive cannot be specified within" }
|
||||
!$acc wait(1) ! { dg-error "ACC WAIT directive cannot be specified within" }
|
||||
!$acc update self(z) ! { dg-error "ACC UPDATE directive cannot be specified within" }
|
||||
end do
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user