| 1 |
! { dg-additional-options "-Wuninitialized -O0" } |
| 2 |
! |
| 3 |
! With -O0 only, 'may be uninitalized' warnings show up. |
| 4 |
! For the original testcase, compiled with '-O', |
| 5 |
! see testcase file 'array-with-dt-1a.f90' |
| 6 |
|
| 7 |
type t |
| 8 |
integer, allocatable :: A(:,:) |
| 9 |
end type t |
| 10 |
|
| 11 |
type(t), allocatable :: b(:) |
| 12 |
! { dg-note {'b' declared here} {} { target *-*-* } .-1 } |
| 13 |
|
| 14 |
! Remark: Semantically, the following line requires that 'b' |
| 15 |
! is already present on the device. |
| 16 |
|
| 17 |
!$acc update host(b) |
| 18 |
! { dg-warning {'b\.dim\[0\]\.ubound' may be used uninitialized} {} { target *-*-* } .-1 } |
| 19 |
! { dg-warning {'b\.dim\[0\]\.lbound' may be used uninitialized} {} { target *-*-* } .-2 } |
| 20 |
|
| 21 |
! Remark: Semantically, the following lines require that b is allocated |
| 22 |
! and present on the device. The last line also requires the same for 'A'. |
| 23 |
|
| 24 |
!$acc update host(b(:)) |
| 25 |
!$acc update host(b(1)%A) |
| 26 |
!$acc update host(b(1)%A(:,:)) |
| 27 |
end |