1! { dg-do compile }
2
3module declare_target_1
4  !$omp declare target to (var_1, var_4) link (var_2, var_3) &
5  !$omp & link (var_5) to (var_6)
6  integer :: var_1, var_2, var_3, var_4, var_5, var_6
7  interface
8    subroutine foo
9      !$omp declare target
10    end subroutine
11  end interface
12end
13subroutine bar
14  !$omp declare target
15  integer, save :: var_9
16  !$omp declare target link (var_8) to (baz, var_7) link (var_9) to (var_10)
17  integer, save :: var_7, var_8, var_10
18  integer :: var_11, var_12, var_13, var_14
19  common /c1/ var_11, var_12
20  common /c2/ var_13
21  common /c3/ var_14
22  !$omp declare target (baz, var_7, var_10, /c1/)
23  !$omp declare target to (/c2/)
24  !$omp declare target link (/c3/)
25  !$omp declare target (bar)
26  call baz
27end subroutine
28