PR fortran/82568
commit7ff401d15130dfbe2da146edeac6d19e38edd9c0
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Oct 2017 07:38:59 +0000 (19 07:38 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Oct 2017 07:38:59 +0000 (19 07:38 +0000)
treea348b948e294ac9c727be78f3655ee80dfdf152d
parent0506f36619a347e2f16fbb3d808c6a87d6f63b7f
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253878 138bc75d-0d04-0410-961f-82ee72b054a4
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]