On Tue, Oct 08, 2019 at 02:04:17PM +0200, Tobias Burnus wrote:
>       testsuite/
>       * gfortran.dg/gomp/target-simd.f90: New.

John reported in bugzilla the testcase fails on hppa with an error that
looks like heap corruption, and indeed, running the test under valgrind
fails on x86_64-linux too, the allocatable arrays are 1..100, but the loops
were reading and writing 0..100.  Fixed thusly, tested on x86_64-linux,
committed to trunk.

2019-10-14  Jakub Jelinek  <ja...@redhat.com>

        PR libgomp/92081
        * testsuite/libgomp.fortran/target-simd.f90: Iterate from 1 rather
        than 0.

--- libgomp/testsuite/libgomp.fortran/target-simd.f90.jj        2019-10-09 
09:32:06.826126101 +0200
+++ libgomp/testsuite/libgomp.fortran/target-simd.f90   2019-10-14 
10:45:04.459650503 +0200
@@ -10,14 +10,14 @@ program test
   b = 0
 
   !$omp target simd map(to:a) map(from:b)
-  do i = 0, size(a)
+  do i = 1, size(a)
     b(i) = 5.0 * a(i)
   end do
 
   if (any (b - 5.0 *a > 10.0*epsilon(a))) call abort()
 
   !$omp target simd map(to:a) map(from:b)
-  do i = 0, size(a)
+  do i = 1, size(a)
     b(i) = 2.0 * a(i)
   end do
   !$omp end target simd


        Jakub

Reply via email to