------- Comment #2 from jakub at gcc dot gnu dot org 2005-11-15 08:59 -------
The problem here is a mismatch between determine_parallel_type in gimplify.c
and omp-low.c. During gimplification, it is not considered to be a combined
parallel loop, because OMP_PARALLEL's body contains a DECL_EXPR (for m
variable)
before OMP_FOR. But during omp lowering, that DECL_EXPR is already gone and
therefore the loop is handled as a combined loop. But there are statements
before the FOR_STMT inside of OMP_FOR, and those are moved into a wrong context
when doing a parallel loop.
Maybe we should ignore (some?) DECL_EXPRs in determine_parallel_type, maybe
we need to note the combined parallel status in OMP_PARALLEL's flags.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org,
| |dnovillo at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849