On Fri, Mar 07, 2014 at 09:21:48PM +0100, Thomas Schwinge wrote:
> Maybe it's just too late on a Friday evening, but I don't understand this
> change, part of r204863.  GF_OMP_FOR_KIND_FOR has the value zero;
> shouldn't this comparison have remained unchanged?  Is the following
> (untested) patch OK for trunk?  Does this need a test case?
> 
> commit f3c7834ecbedc50e04223d24b1b671fc8a62c169
> Author: Thomas Schwinge <tho...@codesourcery.com>
> Date:   Fri Mar 7 21:11:43 2014 +0100
> 
>     Restore check for OpenMP for construct.
>     
>       gcc/
>       * omp-low.c (lower_rec_input_clauses) <build_omp_barrier>: Restore
>       check for GF_OMP_FOR_KIND_FOR.

Ok for trunk, sorry for the delay.

> diff --git gcc/omp-low.c gcc/omp-low.c
> index 4dc3956..713a4ae 100644
> --- gcc/omp-low.c
> +++ gcc/omp-low.c
> @@ -3915,7 +3915,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq 
> *ilist, gimple_seq *dlist,
>        /* Don't add any barrier for #pragma omp simd or
>        #pragma omp distribute.  */
>        if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
> -       || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
> +       || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
>       gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
>      }
>  

        Jakub

Reply via email to