2 ! { dg-additional-options "-w" }
6 integer, parameter :: n = 10
8 include "openacc_lib.h"
13 !$acc parallel reduction(+:s1,s2) num_gangs (n) copy(s1)
18 if (acc_get_device_type () .ne. acc_device_host) then
19 if (s1 .ne. n) call abort
20 if (s2 .ne. n) call abort
22 if (s1 .ne. 1) call abort
23 if (s2 .ne. 1) call abort
26 ! Test reductions inside subroutines
30 call redsub (s1, s2, n)
32 if (acc_get_device_type () .ne. acc_device_host) then
33 if (s1 .ne. n) call abort
35 if (s2 .ne. 1) call abort
39 subroutine redsub(s1, s2, n)
43 !$acc parallel reduction(+:s1,s2) num_gangs (10) copy(s1)