[patch, fortran] Fix PR 50690
Thomas Koenig
tkoenig@netcologne.de
Sun Dec 11 10:30:00 GMT 2011
Am 08.12.2011 22:57, schrieb Jakub Jelinek:
> Reading it again, isn't it overkill to keep the
> vector? All you need is a bool and a way to restore its previous state.
Good catch. The vector was a leftover from the time when I was searching
up the call chain to check for any enclosing workshare.
Updated patch attached. I put a goto in there to simulate a double
"fall through", as you'll see in the patch. If anybody has strong
negative feelings about this, I will replace it with a switch within a
switch.
Regression-tested. OK for trunk (finally)?
Thomas
2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50690
* frontend-passes.c (in_omp_workshare): New variable.
(cfe_expr_0): Don't eliminiate common function if it would put
the variable immediately into a WORKSHARE construct.
(optimize_namespace): Set in_omp_workshare.
(gfc_code_walker): Keep track of OMP PARALLEL and OMP WORKSHARE
constructs.
2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50690
* gfortran.dg/gomp/workshare2.f90: New test.
* gfortran.dg/gomp/workshare3.f90: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: workshare3.f90
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111211/d210165c/attachment.f90>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: workshare2.f90
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111211/d210165c/attachment-0001.f90>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: workshare-11.diff
Type: text/x-patch
Size: 2674 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111211/d210165c/attachment.bin>
More information about the Gcc-patches
mailing list