[patch, Fortran] Fix PR 50690

Thomas Koenig tkoenig@netcologne.de
Sat Oct 15 16:09:00 GMT 2011


Hi Jakub,

>I guess you want
> to create the var at function scope and add a private(that_temporary)
> clause to the nearest enclosing OpenMP directive.

Here is a patch which implements this.  Regression-tested, no new
failures.  OK for trunk?

	Thomas

2011-10-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/50690
         * frontend-passes.c (omp_level):  New variable.
         (omp_size):  New variable.
         (omp_block):  New variable.
         (create_var):  If we are within an OMP block, put
         the variable in the enclosing namespace and add it to
         the PRIVATE clause of the enclosing OMP block.
         (optimize_namespace):  Initialize omp_level.
         (gfc_code_walker):  Keep track of omp level.

2011-10-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/50690
         * gfortran.dg/gomp/workshare2.f90:  New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: workshare-3.diff
Type: text/x-patch
Size: 3458 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111015/313195db/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: workshare2.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111015/313195db/attachment.f90>


More information about the Fortran mailing list