Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/uninit-dim-clause.f95

raw
1 ! { dg-additional-options "-Wuninitialized" }
2
3 ! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
4 ! aspects of that functionality.
5
6 subroutine acc_parallel
7 implicit none
8 integer :: i, j, k
9 ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
10 ! { dg-note {'j' was declared here} {} { target *-*-* } .-2 }
11 ! { dg-note {'k' was declared here} {} { target *-*-* } .-3 }
12
13 !$acc parallel num_gangs(i) ! { dg-warning "is used uninitialized" }
14 ! { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-1 }
15 !$acc end parallel
16
17 !$acc parallel num_workers(j) ! { dg-warning "is used uninitialized" }
18 ! { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-1 }
19 !$acc end parallel
20
21 !$acc parallel vector_length(k) ! { dg-warning "is used uninitialized" }
22 ! { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-1 }
23 !$acc end parallel
24 end subroutine acc_parallel
25
26 subroutine acc_kernels
27 implicit none
28 integer :: i, j, k
29 ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
30 ! { dg-note {'j' was declared here} {} { target *-*-* } .-2 }
31 ! { dg-note {'k' was declared here} {} { target *-*-* } .-3 }
32
33 !$acc kernels num_gangs(i) ! { dg-warning "is used uninitialized" }
34 !$acc end kernels
35
36 !$acc kernels num_workers(j) ! { dg-warning "is used uninitialized" }
37 !$acc end kernels
38
39 !$acc kernels vector_length(k) ! { dg-warning "is used uninitialized" }
40 !$acc end kernels
41 end subroutine acc_kernels