| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fdump-tree-original" } |
| 3 |
! |
| 4 |
! PR fortran/120723 - scalar OpenACC attach/detach must not lower through a |
| 5 |
! standalone pointer-mapping node. |
| 6 |
|
| 7 |
implicit none (type, external) |
| 8 |
integer, pointer :: a, b(:) |
| 9 |
integer, allocatable :: c, d(:) |
| 10 |
|
| 11 |
! Scalar pointer and allocatable items used to ICE here. |
| 12 |
!$acc enter data attach(a, c) |
| 13 |
!$acc enter data attach(b, d) |
| 14 |
!$acc exit data detach(a, c) |
| 15 |
!$acc exit data detach(b, d) |
| 16 |
|
| 17 |
! { dg-final { scan-tree-dump-times "(?n)#pragma acc enter data map\\(attach:a \\\[bias: 0\\\]\\) map\\(attach:c \\\[bias: 0\\\]\\);$" 1 "original" } } |
| 18 |
! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data map\\(detach:a \\\[bias: 0\\\]\\) map\\(detach:c \\\[bias: 0\\\]\\);$" 1 "original" } } |
| 19 |
|
| 20 |
end |