Hi!

This got also fixed by PR69281 fix I've just committed, I've added the
testcase too.

2016-08-19  Jakub Jelinek  <ja...@redhat.com>

        PR fortran/72744
        * gfortran.dg/gomp/pr72744.f90: New test.

--- gcc/testsuite/gfortran.dg/gomp/pr72744.f90.jj       2016-08-19 
14:49:18.590105777 +0200
+++ gcc/testsuite/gfortran.dg/gomp/pr72744.f90  2016-08-19 14:48:58.000000000 
+0200
@@ -0,0 +1,18 @@
+! PR fortran/72744
+! { dg-do compile }
+! { dg-additional-options "-Ofast" }
+
+program pr72744
+  integer, parameter :: n = 20
+  integer :: i, z(n), h(n)
+  z = [(i, i=1,n)]
+  h = [(i, i=n,1,-1)]
+  call sub (n, h)
+  if ( any(h/=z) ) call abort
+end
+subroutine sub (n, x)
+  integer :: n, x(n)
+!$omp parallel
+  x(:) = x(n:1:-1)
+!$omp end parallel
+end

        Jakub

Reply via email to