re PR fortran/82568 ([6/7/8] ICE with do-loop inside BLOCK inside omp)
authorJakub Jelinek <jakub@redhat.com>
Thu, 19 Oct 2017 07:38:59 +0000 (09:38 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 19 Oct 2017 07:38:59 +0000 (09:38 +0200)
commitcd30a0b8fec5e27d43349e4d48e166f1ccde6306
treea348b948e294ac9c727be78f3655ee80dfdf152d
parentbcc478b9647e2af4b715fda6676d98f1e129d16b
re PR fortran/82568 ([6/7/8] ICE with do-loop inside BLOCK inside omp)

PR fortran/82568
* gfortran.h (gfc_resolve_do_iterator): Add a bool arg.
(gfc_resolve_omp_local_vars): New declaration.
* openmp.c (omp_current_ctx): Make static.
(gfc_resolve_omp_parallel_blocks): Handle EXEC_OMP_TASKLOOP
and EXEC_OMP_TASKLOOP_SIMD.
(gfc_resolve_do_iterator): Add ADD_CLAUSE argument, if false,
don't actually add any clause.  Move omp_current_ctx test
earlier.
(handle_local_var, gfc_resolve_omp_local_vars): New functions.
* resolve.c (gfc_resolve_code): Call gfc_resolve_omp_parallel_blocks
instead of just gfc_resolve_omp_do_blocks for EXEC_OMP_TASKLOOP
and EXEC_OMP_TASKLOOP_SIMD.
(gfc_resolve_code): Adjust gfc_resolve_do_iterator caller.
(resolve_codes): Call gfc_resolve_omp_local_vars.

* gfortran.dg/gomp/pr82568.f90: New test.

From-SVN: r253878
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/openmp.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr82568.f90 [new file with mode: 0644]