Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-2.f90

raw
1 ! Test to ensure that HAS_DEVICE_ADDR is removed for non-used variables.
2
3 ! { dg-do compile }
4 ! { dg-additional-options "-fdump-tree-gimple" }
5
6 program main
7 use iso_c_binding
8 implicit none
9
10 integer :: x, y
11 call foo (x, y)
12
13 contains
14 subroutine foo (a, b)
15 integer :: a, b
16
17 !$omp target data map(a) use_device_addr(a)
18 !$omp target has_device_addr(a)
19 a = 42
20 !$omp end target
21 !$omp end target data
22 end subroutine foo
23
24 end program main
25
26 ! { dg-final { scan-tree-dump "has_device_addr\\(a\\)" "gimple" } }
27 ! { dg-final { scan-tree-dump-not "has_device_addr\\(b\\)" "gimple" } }