2 ! { dg-add-options ieee }
3 ! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
4 real :: a(3), nan
, minf
, pinf
5 real, allocatable
:: c(:)
18 if (minloc (a
, dim
= 1).ne
.1) call abort
19 if (.not
.isnan(minval (a
, dim
= 1))) call abort
21 if (minloc (a
, dim
= 1).ne
.1) call abort
22 if (minval (a
, dim
= 1).ne
.pinf
) call abort
24 if (minloc (a
, dim
= 1).ne
.3) call abort
25 if (minval (a
, dim
= 1).ne
.pinf
) call abort
27 if (minloc (a
, dim
= 1).ne
.2) call abort
28 if (minval (a
, dim
= 1).ne
.1) call abort
30 if (minloc (a
, dim
= 1).ne
.2) call abort
31 if (minval (a
, dim
= 1).ne
.minf
) call abort
33 if (minloc (c
, dim
= 1).ne
.1) call abort
34 if (.not
.isnan(minval (c
, dim
= 1))) call abort
36 if (minloc (c
, dim
= 1).ne
.1) call abort
37 if (minval (c
, dim
= 1).ne
.pinf
) call abort
39 if (minloc (c
, dim
= 1).ne
.3) call abort
40 if (minval (c
, dim
= 1).ne
.pinf
) call abort
42 if (minloc (c
, dim
= 1).ne
.2) call abort
43 if (minval (c
, dim
= 1).ne
.1) call abort
45 if (minloc (c
, dim
= 1).ne
.2) call abort
46 if (minval (c
, dim
= 1).ne
.minf
) call abort
50 if (minloc (a
, dim
= 1, mask
= l
).ne
.0) call abort
51 if (minval (a
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
52 if (minloc (a
, dim
= 1, mask
= l2
).ne
.0) call abort
53 if (minval (a
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
55 if (minloc (a
, dim
= 1, mask
= l
).ne
.0) call abort
56 if (minval (a
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
57 if (minloc (a
, dim
= 1, mask
= l2
).ne
.0) call abort
58 if (minval (a
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
60 if (minloc (a
, dim
= 1, mask
= l
).ne
.0) call abort
61 if (minval (a
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
62 if (minloc (a
, dim
= 1, mask
= l2
).ne
.0) call abort
63 if (minval (a
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
65 if (minloc (a
, dim
= 1, mask
= l
).ne
.0) call abort
66 if (minval (a
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
67 if (minloc (a
, dim
= 1, mask
= l2
).ne
.0) call abort
68 if (minval (a
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
70 if (minloc (a
, dim
= 1, mask
= l
).ne
.0) call abort
71 if (minval (a
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
72 if (minloc (a
, dim
= 1, mask
= l2
).ne
.0) call abort
73 if (minval (a
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
75 if (minloc (c
, dim
= 1, mask
= l
).ne
.0) call abort
76 if (minval (c
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
77 if (minloc (c
, dim
= 1, mask
= l2
).ne
.0) call abort
78 if (minval (c
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
80 if (minloc (c
, dim
= 1, mask
= l
).ne
.0) call abort
81 if (minval (c
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
82 if (minloc (c
, dim
= 1, mask
= l2
).ne
.0) call abort
83 if (minval (c
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
85 if (minloc (c
, dim
= 1, mask
= l
).ne
.0) call abort
86 if (minval (c
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
87 if (minloc (c
, dim
= 1, mask
= l2
).ne
.0) call abort
88 if (minval (c
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
90 if (minloc (c
, dim
= 1, mask
= l
).ne
.0) call abort
91 if (minval (c
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
92 if (minloc (c
, dim
= 1, mask
= l2
).ne
.0) call abort
93 if (minval (c
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
95 if (minloc (c
, dim
= 1, mask
= l
).ne
.0) call abort
96 if (minval (c
, dim
= 1, mask
= l
).ne
.huge(pinf
)) call abort
97 if (minloc (c
, dim
= 1, mask
= l2
).ne
.0) call abort
98 if (minval (c
, dim
= 1, mask
= l2
).ne
.huge(pinf
)) call abort
102 if (minloc (a
, dim
= 1, mask
= l
).ne
.1) call abort
103 if (.not
.isnan(minval (a
, dim
= 1, mask
= l
))) call abort
104 if (minloc (a
, dim
= 1, mask
= l2
).ne
.1) call abort
105 if (.not
.isnan(minval (a
, dim
= 1, mask
= l2
))) call abort
107 if (minloc (a
, dim
= 1, mask
= l
).ne
.1) call abort
108 if (minval (a
, dim
= 1, mask
= l
).ne
.pinf
) call abort
109 if (minloc (a
, dim
= 1, mask
= l2
).ne
.1) call abort
110 if (minval (a
, dim
= 1, mask
= l2
).ne
.pinf
) call abort
112 if (minloc (a
, dim
= 1, mask
= l
).ne
.3) call abort
113 if (minval (a
, dim
= 1, mask
= l
).ne
.pinf
) call abort
114 if (minloc (a
, dim
= 1, mask
= l2
).ne
.3) call abort
115 if (minval (a
, dim
= 1, mask
= l2
).ne
.pinf
) call abort
117 if (minloc (a
, dim
= 1, mask
= l
).ne
.2) call abort
118 if (minval (a
, dim
= 1, mask
= l
).ne
.1) call abort
119 if (minloc (a
, dim
= 1, mask
= l2
).ne
.2) call abort
120 if (minval (a
, dim
= 1, mask
= l2
).ne
.1) call abort
122 if (minloc (a
, dim
= 1, mask
= l
).ne
.2) call abort
123 if (minval (a
, dim
= 1, mask
= l
).ne
.minf
) call abort
124 if (minloc (a
, dim
= 1, mask
= l2
).ne
.2) call abort
125 if (minval (a
, dim
= 1, mask
= l2
).ne
.minf
) call abort
127 if (minloc (c
, dim
= 1, mask
= l
).ne
.1) call abort
128 if (.not
.isnan(minval (c
, dim
= 1, mask
= l
))) call abort
129 if (minloc (c
, dim
= 1, mask
= l2
).ne
.1) call abort
130 if (.not
.isnan(minval (c
, dim
= 1, mask
= l2
))) call abort
132 if (minloc (c
, dim
= 1, mask
= l
).ne
.1) call abort
133 if (minval (c
, dim
= 1, mask
= l
).ne
.pinf
) call abort
134 if (minloc (c
, dim
= 1, mask
= l2
).ne
.1) call abort
135 if (minval (c
, dim
= 1, mask
= l2
).ne
.pinf
) call abort
137 if (minloc (c
, dim
= 1, mask
= l
).ne
.3) call abort
138 if (minval (c
, dim
= 1, mask
= l
).ne
.pinf
) call abort
139 if (minloc (c
, dim
= 1, mask
= l2
).ne
.3) call abort
140 if (minval (c
, dim
= 1, mask
= l2
).ne
.pinf
) call abort
142 if (minloc (c
, dim
= 1, mask
= l
).ne
.2) call abort
143 if (minval (c
, dim
= 1, mask
= l
).ne
.1) call abort
144 if (minloc (c
, dim
= 1, mask
= l2
).ne
.2) call abort
145 if (minval (c
, dim
= 1, mask
= l2
).ne
.1) call abort
147 if (minloc (c
, dim
= 1, mask
= l
).ne
.2) call abort
148 if (minval (c
, dim
= 1, mask
= l
).ne
.minf
) call abort
149 if (minloc (c
, dim
= 1, mask
= l2
).ne
.2) call abort
150 if (minval (c
, dim
= 1, mask
= l2
).ne
.minf
) call abort
153 if (minloc (c
, dim
= 1).ne
.0) call abort
154 if (minval (c
, dim
= 1).ne
.huge(pinf
)) call abort