3 ! { dg-additional-options -Wuninitialized }
5 ! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
6 ! aspects of that functionality.
10 integer, parameter :: n
= 10
12 include "openacc_lib.h"
17 !$acc parallel reduction(+:s1,s2) num_gangs (n) copy(s1)
18 ! { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction'" { xfail *-*-* } .-1 }
23 if (acc_get_device_type () .ne
. acc_device_host
) then
31 ! Test reductions inside subroutines
35 call redsub (s1
, s2
, n
)
37 if (acc_get_device_type () .ne
. acc_device_host
) then
44 subroutine redsub(s1
, s2
, n
)
48 !$acc parallel reduction(+:s1,s2) num_gangs (10) copy(s1)
49 ! { dg-bogus {'s1\.[0-9]+' is used uninitialized} TODO { xfail *-*-* } .-1 }
50 ! { dg-note {'s1\.[0-9]+' was declared here} {} { target *-*-* } .-2 }
51 ! { dg-bogus {'s2\.[0-9]+' is used uninitialized} TODO { xfail *-*-* } .-3 }
52 ! { dg-note {'s2\.[0-9]+' was declared here} {} { target *-*-* } .-4 }
53 ! { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction'" { xfail *-*-* } .-5 }