1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
subroutine f
implicit none
type t
integer :: i
end type t
integer, target :: scalar
integer, target :: array(5)
integer, pointer :: ptr1, ptr2(:)
integer, allocatable :: alloc1, alloc2(:)
type(t) :: agg1, agg2(2)
scalar = 1
array = [1,2,3,4,5]
ptr1 => scalar
ptr2 => array
alloc1 = 5
alloc2 = [1,2]
agg1%i = 1
agg2(:)%i = [1,2]
!$omp target defaultmap(firstprivate ) defaultmap(firstprivate : aggregate) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP with unspecified category" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(firstprivate : all ) defaultmap(alloc : pointer) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category ALL" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(firstprivate : aggregate) defaultmap(firstprivate ) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category AGGREGATE" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(alloc : pointer) defaultmap(firstprivate : all ) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category POINTER" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(firstprivate :all ) defaultmap(firstprivate : all) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category ALL" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(firstprivate ) defaultmap(firstprivate) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP with unspecified category" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(firstprivate ) defaultmap(firstprivate : all) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP with unspecified category" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
!$omp target defaultmap(firstprivate : all) defaultmap(firstprivate) ! { dg-error "DEFAULTMAP at .1. but prior DEFAULTMAP for category ALL" }
block
scalar = 1;
array(1) = 2;
if (associated(ptr1)) &
agg1%i = 3;
if (associated(ptr2)) &
agg2(1)%i = 3;
if (allocated(alloc1)) &
alloc2(1) = 0
end block
end
|