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.
+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
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 ();
}
+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
--- /dev/null
+! 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