Commit d79ee524 by Tom de Vries Committed by Tom de Vries

Add missing initializations in oacc testcases

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
parent 9bf63f8c
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> 2016-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp: Remove v7ve entry from loop * lib/target-supports.exp: Remove v7ve entry from loop
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
void void
foo (void) foo (void)
{ {
unsigned int i; unsigned int i = 0;
#pragma acc kernels #pragma acc kernels
{ {
i++; i++;
......
...@@ -14,6 +14,7 @@ program test ...@@ -14,6 +14,7 @@ program test
! !$acc end parallel ! !$acc end parallel
!$acc parallel private (k) !$acc parallel private (k)
k = 0
!$acc loop reduction (+:k) !$acc loop reduction (+:k)
do i = 1, n do i = 1, n
k = k + 1 k = k + 1
......
...@@ -5,6 +5,7 @@ module param ...@@ -5,6 +5,7 @@ module param
end module param end module param
subroutine gang (a) subroutine gang (a)
use param
!$acc routine gang !$acc routine gang
integer, intent (inout) :: a(N) integer, intent (inout) :: a(N)
integer :: i integer :: i
...@@ -31,6 +32,7 @@ subroutine gang (a) ...@@ -31,6 +32,7 @@ subroutine gang (a)
end subroutine gang end subroutine gang
subroutine worker (a) subroutine worker (a)
use param
!$acc routine worker !$acc routine worker
integer, intent (inout) :: a(N) integer, intent (inout) :: a(N)
integer :: i integer :: i
...@@ -57,6 +59,7 @@ subroutine worker (a) ...@@ -57,6 +59,7 @@ subroutine worker (a)
end subroutine worker end subroutine worker
subroutine vector (a) subroutine vector (a)
use param
!$acc routine vector !$acc routine vector
integer, intent (inout) :: a(N) integer, intent (inout) :: a(N)
integer :: i integer :: i
...@@ -83,6 +86,7 @@ subroutine vector (a) ...@@ -83,6 +86,7 @@ subroutine vector (a)
end subroutine vector end subroutine vector
subroutine seq (a) subroutine seq (a)
use param
!$acc routine seq !$acc routine seq
integer, intent (inout) :: a(N) integer, intent (inout) :: a(N)
integer :: i integer :: i
......
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> 2016-03-23 James Norris <jnorris@codesourcery.com>
Daichi Fukuoka <dc-fukuoka@sgi.com> Daichi Fukuoka <dc-fukuoka@sgi.com>
......
...@@ -92,8 +92,8 @@ program reduction_2 ...@@ -92,8 +92,8 @@ program reduction_2
if (result.ne.vresult) call abort if (result.ne.vresult) call abort
result = 1 lresult = .true.
vresult = 1 lvresult = .true.
! '.and.' reductions ! '.and.' reductions
......
...@@ -92,8 +92,8 @@ program reduction_3 ...@@ -92,8 +92,8 @@ program reduction_3
if (result.ne.vresult) call abort if (result.ne.vresult) call abort
result = 1 lresult = .true.
vresult = 1 lvresult = .true.
! '.and.' reductions ! '.and.' reductions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment