> Please either drop lastprivate(k) clause or use linear(k:1)
> The iteration var of simd loop without collapse or with
> collapse(1) is implicitly linear with the step, and even linear
> means the value from the last iteration can be used after the
> simd construct.  Overriding the data sharing to something different
> has been only added recently to OpenMP and isn't really needed here.
> 

Sorry I know very little about fortran, is this ok?

Regtested on aarch64-none-linux-gnu and no issues.

Ok for master?

Thanks,
Tamar

gcc/testsuite/ChangeLog:

        PR tree-optimization/113808
        * gfortran.dg/vect/vect-early-break_1-PR113808.f90: Moved to...
        * gfortran.dg/vect/vect-early-break_1-pr113808.f90: ...here.

--- inline copy of patch ---

diff --git a/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90 
b/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-pr113808.f90
similarity index 93%
rename from gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
rename to gcc/testsuite/gfortran.dg/vect/vect-early-break_1-pr113808.f90
index 
5c339fa7a348fac5527bbbf456a535da96b5c1ed..6f92e9095bdee08a5a9db2816f57da6c14d91b11
 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-pr113808.f90
@@ -9,7 +9,7 @@ program main
   integer :: n, i,k
   n = 11
   do i = 1, n,2
-    !$omp simd lastprivate(k)
+    !$omp simd
     do k = 1, i + 41
       if (k > 11 + 41 .or. k < 1) error stop
     end do

Attachment: rb18253.patch
Description: rb18253.patch

Reply via email to