3 ! { dg-additional-options -Wuninitialized }
9 SUBROUTINE reduction_kernel(x_min
,x_max
,y_min
,y_max
,arr
,sum
)
13 INTEGER :: x_min
,x_max
,y_min
,y_max
14 REAL(KIND
=8), DIMENSION(x_min
-2:x_max
+2,y_min
-2:y_max
+2) :: arr
19 !$ACC DATA PRESENT(arr) COPY(sum)
20 !$ACC PARALLEL LOOP REDUCTION(+ : sum)
21 ! { dg-bogus {'sum\.[0-9]+' is used uninitialized} TODO { xfail *-*-* } .-1 }
22 ! { dg-note {'sum\.[0-9]+' was declared here} {} { target *-*-* } .-2 }
28 !$ACC END PARALLEL LOOP
30 END SUBROUTINE reduction_kernel
32 END MODULE reduction_test
37 integer :: x_min
,x_max
,y_min
,y_max
38 real(kind
=8), dimension(1:10,1:10) :: arr
52 call reduction_kernel(x_min
,x_max
,y_min
,y_max
,arr
,sum
)
56 if (sum
.ne
. 4.0) STOP 1