+2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/83379
+ * gfortran.dg/minval_char_1.f90: Correct logic for mask
+ calculation.
+ * gfortran.dg/minval_char_2.f90: Likewise.
+ * gfortran.dg/maxval_char_1.f90: Likewise.
+ * gfortran.dg/maxval_char_2.f90: Likewise.
+
2017-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45689
res = maxval(a,dim=1)
if (res /= '00030') call abort
do
- call random_number(r)
- if (count(r>0.2) > 1) exit
+ call random_number(r)
+ v = int(r * 100)
+ if (count (v>20) > 1) exit
end do
- v = int(r * 100)
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') maxval(v)
if (res /= maxval(b)) call abort
smask = .false.
if (all_zero /= maxval(b, smask)) call abort
- mask = v < 30
+ mask = v > 20
write (unit=res,fmt='(I5.5)') maxval(v,mask)
if (res /= maxval(b, mask)) call abort
mask = .false.
if (res /= 4_'00030') call abort
do
call random_number(r)
- if (count(r>0.2) > 1) exit
+ v = int(r * 100)
+ if (count(v > 20) > 1) exit
end do
- v = int(r * 100)
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') maxval(v)
if (res /= maxval(b)) call abort
smask = .false.
if (all_zero /= maxval(b, smask)) call abort
- mask = v < 30
+ mask = v > 20
write (unit=res,fmt='(I5.5)') maxval(v,mask)
if (res /= maxval(b, mask)) call abort
mask = .false.
res = minval(a)
if (res /= '00026') call abort
do
- call random_number(r)
- if (count(r<0.2) > 1) exit
+ call random_number(r)
+ v = int(r * 100)
+ if (count(v < 30) > 1) exit
end do
- v = int(r * 100)
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') minval(v)
if (res /= minval(b)) call abort
if (res /= 4_'00026') call abort
do
call random_number(r)
- if (count(r>0.2) > 1) exit
+ v = int(r * 100)
+ if (count(v<30) > 1) exit
end do
- v = int(r * 100)
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') minval(v)
if (res /= minval(b)) call abort