1! { dg-do compile }
2subroutine test(b,c,d)
3  implicit none
4  integer, value, target :: b
5  integer, pointer :: c
6  integer, allocatable, target :: d
7
8  integer, target :: a(5)
9
10  !$omp target is_device_ptr(a) ! { dg-error "Non-dummy object .a. in IS_DEVICE_PTR clause" }
11  !$omp end target
12
13  !$omp target is_device_ptr(b) ! { dg-error "VALUE object .b. in IS_DEVICE_PTR clause" }
14  !$omp end target
15
16  !$omp target is_device_ptr(c) ! { dg-error "POINTER object .c. in IS_DEVICE_PTR clause" }
17  !$omp end target
18
19  !$omp target is_device_ptr(d) ! { dg-error "ALLOCATABLE object .d. in IS_DEVICE_PTR clause" }
20  !$omp end target
21
22  !$omp target data map(a) use_device_addr(a)  ! Should be okay
23  !$omp end target data
24
25  !$omp target data map(c) use_device_ptr(c)  ! Should be okay
26  !$omp end target data
27end subroutine test
28