1! PR fortran/92568
2!
3implicit none
4  type t
5  end type t
6
7  integer :: ii
8  integer :: arr(5)
9  integer, allocatable :: aii, aarr(:)
10  integer, pointer :: pii, parr(:)
11
12  character :: str1, str1arr(5), str1a, str1aarr(:), str1p, str1parr(:)
13  character(len=5) :: str5, str5arr(5), str5a, str5aarr(:), str5p, str5parr(:)
14  character(len=:) :: strXa, strXaarr(:), strXp, strXparr(:)
15  allocatable :: str1a, str1aarr, str5a, str5aarr, strXa, strXaarr
16  pointer :: str1p, str1parr, str5p, str5parr, strXp, strXparr
17
18  type(t) :: dt, dtarr(5), dta, dtaarr(:), dtp, dtparr(:)
19  allocatable :: dta, dtaarr
20  pointer :: dtp, dtparr
21
22  allocate(aii, aarr(5), str1a, str1aarr(5), dta, dtparr(5))
23  allocate(pii, parr(5), str1p, str1parr(5), dtp, dtparr(5))
24  allocate(character(len=7) :: strXa, strXaarr(5), strXp, strXparr(5))
25
26
27  !$omp target defaultmap ( none )  ! { dg-note "enclosing 'target'" }
28    ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
29    ! { dg-error "'ii' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
30    ! { dg-error "'arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
31    ! { dg-error "'aii' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
32    ! { dg-error "'aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
33    ! { dg-error "'pii' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
34    ! { dg-error "'parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
35
36    str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
37    ! { dg-error "'str1' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
38    ! { dg-error "'str1arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
39    ! { dg-error "'str1a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
40    ! { dg-error "'str1aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
41    ! { dg-error "'str1p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
42    ! { dg-error "'str1parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
43
44    str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
45    ! { dg-error "'str5' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
46    ! { dg-error "'str5arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
47    ! { dg-error "'str5a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
48    ! { dg-error "'str5aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
49    ! { dg-error "'str5p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
50    ! { dg-error "'str5parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
51
52    strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
53    ! { dg-error "'strxa' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
54    ! { dg-error "'strxaarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
55    ! { dg-error "'strxp' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
56    ! { dg-error "'strxparr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
57
58    dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
59    ! { dg-error "'dt' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
60    ! { dg-error "'dtarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
61    ! { dg-error "'dta' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
62    ! { dg-error "'dtaarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
63    ! { dg-error "'dtp' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
64    ! { dg-error "'dtparr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
65  !$omp end target
66
67
68  !$omp target defaultmap(none : scalar)  defaultmap(none : aggregate)  &
69  !$omp&       defaultmap(none : allocatable) defaultmap(none : pointer)   ! { dg-note "enclosing 'target'" }
70    ii = 42; arr = 42; aii = 42; aarr = 42; pii = 42; parr = 42
71    ! { dg-error "'ii' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
72    ! { dg-error "'arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
73    ! { dg-error "'aii' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
74    ! { dg-error "'aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
75    ! { dg-error "'pii' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
76    ! { dg-error "'parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
77
78    str1 = ""; str1arr = ""; str1a = ""; str1aarr = ""; str1p = ""; str1parr = ""
79    ! { dg-error "'str1' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
80    ! { dg-error "'str1arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
81    ! { dg-error "'str1a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
82    ! { dg-error "'str1aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
83    ! { dg-error "'str1p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
84    ! { dg-error "'str1parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
85
86    str5 = ""; str5arr = ""; str5a = ""; str5aarr = ""; str5p = ""; str5parr = ""
87    ! { dg-error "'str5' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
88    ! { dg-error "'str5arr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
89    ! { dg-error "'str5a' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
90    ! { dg-error "'str5aarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
91    ! { dg-error "'str5p' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
92    ! { dg-error "'str5parr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
93
94    strXa = ""; strXaarr = ""; strXp = ""; strXparr = ""
95    ! { dg-error "'strxa' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
96    ! { dg-error "'strxaarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
97    ! { dg-error "'strxp' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
98    ! { dg-error "'strxparr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
99
100    dt = t(); dtarr = t(); dta = t(); dtaarr = t(); dtp = t(); dtparr = t()
101    ! { dg-error "'dt' not specified in enclosing 'target'" "" { target *-*-* } .-1 }
102    ! { dg-error "'dtarr' not specified in enclosing 'target'" "" { target *-*-* } .-2 }
103    ! { dg-error "'dta' not specified in enclosing 'target'" "" { target *-*-* } .-3 }
104    ! { dg-error "'dtaarr' not specified in enclosing 'target'" "" { target *-*-* } .-4 }
105    ! { dg-error "'dtp' not specified in enclosing 'target'" "" { target *-*-* } .-5 }
106    ! { dg-error "'dtparr' not specified in enclosing 'target'" "" { target *-*-* } .-6 }
107  !$omp end target
108end
109