Add missing initializations in oacc testcases
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Mar 2016 17:32:05 +0000 (17:32 +0000)
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234432 138bc75d-0d04-0410-961f-82ee72b054a4

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 d072548..7ce1d28 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 58cd5e1..cb031c1 100644 (file)
@@ -4,7 +4,7 @@
 void
 foo (void)
 {
-  unsigned int i;
+  unsigned int i = 0;
 #pragma acc kernels
   {
     i++;
index 3490263..a7c6d81 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 68c5149..5037a31 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 fe98434..12d7834 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 3d99668..96955ce 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 d0b590e..ecf7fbe 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