Commit 5e20aef8 by Thomas Koenig

re PR fortran/83379 (Intermittent failure of min/maxval_char*.f90 test cases)

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.

From-SVN: r255543
parent 317fa064
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
* gfortran.dg/minval_parameter_1.f90: New test.
* gfortran.dg/maxval_parameter_1.f90: New test.
......
......@@ -19,10 +19,10 @@ program main
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
......@@ -31,7 +31,7 @@ program main
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.
......
......@@ -18,9 +18,9 @@ program main
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
......@@ -29,7 +29,7 @@ program main
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.
......
......@@ -17,10 +17,10 @@ program main
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
......
......@@ -20,9 +20,9 @@ program main
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment