Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / reference-reductions.f90
blob055d22510c4300616de4fb4ae51916d557243431
1 ! Test reductions on dummy arguments inside modules.
3 ! { dg-do run }
5 ! { dg-additional-options -Wuninitialized }
7 module prm
8 implicit none
10 contains
12 subroutine param_reduction(var)
13 implicit none
14 integer(kind=8) :: var
15 integer :: j,k
17 !$acc parallel copy(var)
18 !$acc loop reduction(+ : var) gang
19 ! { dg-bogus {'var\.[0-9]+' is used uninitialized} TODO { xfail *-*-* } .-1 }
20 ! { dg-note {'var\.[0-9]+' was declared here} {} { target *-*-* } .-2 }
21 do k=1,10
22 !$acc loop vector reduction(+ : var)
23 ! { dg-bogus {'var\.[0-9]+' may be used uninitialized} TODO { xfail { ! __OPTIMIZE__ } } .-1 }
24 ! { dg-note {'var\.[0-9]+' was declared here} {} { target { ! __OPTIMIZE__ } } .-2 }
25 do j=1,100
26 var = var + 1.0
27 enddo
28 enddo
29 !$acc end parallel
30 end subroutine param_reduction
32 end module prm
34 program test
35 use prm
36 implicit none
38 integer(8) :: r
40 r=10.0
41 call param_reduction (r)
43 if (r .ne. 1010) stop 1
44 end program test