The OpenACC 'resolve_oacc_nested_loops' function duplicates most code of the
OpenMP 'resolve_omp_do', but didn't include the PR60127 "ICE with OpenMP and DO
CONCURRENT" (trunk r210331) changes. (Probably the two functions should be
unified?)
The Fortran DO CONCURRENT construct is a way to tell the compiler that loop
iterations don't have any interdependencies -- which is information that would
very well be suitable for OpenACC/OpenMP loops. There are some "details"
however, see the discussion/references in PR60127, so for the time being, make
this a compile-time error instead of an ICE.
gcc/fortran/
* openmp.c (resolve_oacc_nested_loops): Error on do concurrent
loops.
gcc/testsuite/
* gfortran.dg/goacc/loop-3-2.f95: Error on do concurrent loops.
* gfortran.dg/goacc/loop-3.f95: Likewise.
* gfortran.dg/goacc/pr72715.f90: New test.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268875
138bc75d-0d04-0410-961f-
82ee72b054a4
+2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR fortran/72715
+ * openmp.c (resolve_oacc_nested_loops): Error on do concurrent
+ loops.
+
2019-02-13 Martin Liska <mliska@suse.cz>
PR fortran/88649
"at %L", &do_code->loc);
break;
}
- gcc_assert (do_code->op == EXEC_DO || do_code->op == EXEC_DO_CONCURRENT);
+ if (do_code->op == EXEC_DO_CONCURRENT)
+ {
+ gfc_error ("!$ACC LOOP cannot be a DO CONCURRENT loop at %L",
+ &do_code->loc);
+ break;
+ }
+ gcc_assert (do_code->op == EXEC_DO);
if (do_code->ext.iterator->var->ts.type != BT_INTEGER)
gfc_error ("!$ACC LOOP iteration variable must be of type integer at %L",
&do_code->loc);
+2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR fortran/72715
+ * gfortran.dg/goacc/loop-3-2.f95: Error on do concurrent loops.
+ * gfortran.dg/goacc/loop-3.f95: Likewise.
+ * gfortran.dg/goacc/pr72715.f90: New test.
+
2019-02-14 Martin Liska <mliska@suse.cz>
PR rtl-optimization/89242
!$acc end parallel
!$acc end loop ! { dg-error "Unexpected" }
- ! OpenACC supports Fortran 2008 do concurrent statement
+ ! OpenACC does not support Fortran 2008 do concurrent statement
!$acc loop
- do concurrent (i = 1:5)
+ do concurrent (i = 1:5) ! { dg-error "ACC LOOP cannot be a DO CONCURRENT loop" }
end do
!$acc loop
!$acc end parallel
!$acc end loop ! { dg-error "Unexpected" }
- ! OpenACC supports Fortran 2008 do concurrent statement
+ ! OpenACC does not support Fortran 2008 do concurrent statement
!$acc loop
- do concurrent (i = 1:5)
+ do concurrent (i = 1:5) ! { dg-error "ACC LOOP cannot be a DO CONCURRENT loop" }
end do
!$acc loop
--- /dev/null
+program p
+ integer :: i
+ !$acc loop
+ do concurrent (i=1:3) ! { dg-error "ACC LOOP cannot be a DO CONCURRENT loop" }
+ end do
+end program p