Add missing initializations in oacc testcases
authorTom de Vries <tom@codesourcery.com>
Wed, 23 Mar 2016 17:32:05 +0000 (17:32 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 23 Mar 2016 17:32:05 +0000 (17:32 +0000)
2016-03-23  Tom de Vries  <tom@codesourcery.com>

* c-c++-common/goacc/kernels-default.c (foo): Add missing
initialization.
* gfortran.dg/goacc/private-3.f95 (test): Same.
* gfortran.dg/goacc/routine-5.f90 (gang, worker, vector, seq): Add
missing use param.

* testsuite/libgomp.oacc-fortran/reduction-2.f90: Add missing
initialization of lresult and lvresult.
* testsuite/libgomp.oacc-fortran/reduction-3.f90: Same.

From-SVN: r234432

gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/goacc/kernels-default.c
gcc/testsuite/gfortran.dg/goacc/private-3.f95
gcc/testsuite/gfortran.dg/goacc/routine-5.f90
libgomp/ChangeLog
libgomp/testsuite/libgomp.oacc-fortran/reduction-2.f90
libgomp/testsuite/libgomp.oacc-fortran/reduction-3.f90

index d0725480b01bae28f0654d89853033ff08188210..7ce1d289e82461a1123cc762c865614ff7ad925c 100644 (file)
@@ -1,3 +1,11 @@
+2016-03-23  Tom de Vries  <tom@codesourcery.com>
+
+       * c-c++-common/goacc/kernels-default.c (foo): Add missing
+       initialization.
+       * gfortran.dg/goacc/private-3.f95 (test): Same.
+       * gfortran.dg/goacc/routine-5.f90 (gang, worker, vector, seq): Add
+       missing use param.
+
 2016-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * lib/target-supports.exp: Remove v7ve entry from loop
index 58cd5e10a5b374929f4feafd344589c68b239fee..cb031c11a34b27dc4767f6f15d41af0c30586653 100644 (file)
@@ -4,7 +4,7 @@
 void
 foo (void)
 {
-  unsigned int i;
+  unsigned int i = 0;
 #pragma acc kernels
   {
     i++;
index 349026350d4fb66df8f3d800023541bdcc35d3a5..a7c6d81ad4e3712ac645bc71d924ce4793b08198 100644 (file)
@@ -14,6 +14,7 @@ program test
 !  !$acc end parallel
 
   !$acc parallel private (k)
+  k = 0
   !$acc loop reduction (+:k)
   do i = 1, n
      k = k + 1
index 68c5149686698a4831c7de2b76fd82976ac85278..5037a31a6b4b0110c96bc495709acd79defea732 100644 (file)
@@ -5,6 +5,7 @@ module param
 end module param
 
 subroutine gang (a)
+  use param
   !$acc routine gang
   integer, intent (inout) :: a(N)
   integer :: i
@@ -31,6 +32,7 @@ subroutine gang (a)
 end subroutine gang
 
 subroutine worker (a)
+  use param
   !$acc routine worker
   integer, intent (inout) :: a(N)
   integer :: i
@@ -57,6 +59,7 @@ subroutine worker (a)
 end subroutine worker
 
 subroutine vector (a)
+  use param
   !$acc routine vector
   integer, intent (inout) :: a(N)
   integer :: i
@@ -83,6 +86,7 @@ subroutine vector (a)
 end subroutine vector
 
 subroutine seq (a)
+  use param
   !$acc routine seq
   integer, intent (inout) :: a(N)
   integer :: i
index fe9843468b2d60cc580eed5bb9d02af0551667fd..12d78347d67253fb60e86f00a27441e855abea0e 100644 (file)
@@ -1,3 +1,9 @@
+2016-03-23  Tom de Vries  <tom@codesourcery.com>
+
+       * testsuite/libgomp.oacc-fortran/reduction-2.f90: Add missing
+       initialization of lresult and lvresult.
+       * testsuite/libgomp.oacc-fortran/reduction-3.f90: Same.
+
 2016-03-23  James Norris  <jnorris@codesourcery.com>
            Daichi Fukuoka <dc-fukuoka@sgi.com>
 
index 3d99668581fdbc2638cbdaca39fc1ead0d373d80..96955ce71ba6ff2e076d4288ba4bd34058dd2c2c 100644 (file)
@@ -92,8 +92,8 @@ program reduction_2
 
   if (result.ne.vresult) call abort
 
-  result = 1
-  vresult = 1
+  lresult = .true.
+  lvresult = .true.
 
   ! '.and.' reductions
 
index d0b590e64964737ba4b270779397c34bb660de3b..ecf7fbea3b816869671289475e1d7eb7930264e3 100644 (file)
@@ -92,8 +92,8 @@ program reduction_3
 
   if (result.ne.vresult) call abort
 
-  result = 1
-  vresult = 1
+  lresult = .true.
+  lvresult = .true.
 
   ! '.and.' reductions