blob: 7fc92b3cb6e44c3860d2c124cca325f00395e913 [file] [log] [blame]
! Test to ensure that HAS_DEVICE_ADDR is removed for non-used variables.
! { dg-do compile }
! { dg-additional-options "-fdump-tree-gimple" }
program main
use iso_c_binding
implicit none
integer :: x, y
call foo (x, y)
contains
subroutine foo (a, b)
integer :: a, b
!$omp target data map(a) use_device_addr(a)
!$omp target has_device_addr(a)
a = 42
!$omp end target
!$omp end target data
end subroutine foo
end program main
! { dg-final { scan-tree-dump "has_device_addr\\(a\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "has_device_addr\\(b\\)" "gimple" } }