URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [default_format_1.inc] - Rev 694
Compare with Previous | Blame | View Log
module test_default_formatinterface testmodule procedure test_r4module procedure test_r8end interface testinteger, parameter :: count = 200containsfunction test_r4 (start, towards) result (res)integer, parameter :: k = 4integer, intent(in) :: towardsreal(k), intent(in) :: startinteger :: res, ireal(k) :: x, ycharacter(len=100) :: sres = 0if (towards >= 0) thenx = startdo i = 0, countwrite (s,*) xread (s,*) yif (y /= x) res = res + 1x = nearest(x,huge(x))end doend ifif (towards <= 0) thenx = startdo i = 0, countwrite (s,*) xread (s,*) yif (y /= x) res = res + 1x = nearest(x,-huge(x))end doend ifend function test_r4function test_r8 (start, towards) result (res)integer, parameter :: k = 8integer, intent(in) :: towardsreal(k), intent(in) :: startinteger :: res, ireal(k) :: x, ycharacter(len=100) :: sres = 0if (towards >= 0) thenx = startdo i = 0, countwrite (s,*) xread (s,*) yif (y /= x) res = res + 1x = nearest(x,huge(x))end doend ifif (towards <= 0) thenx = startdo i = 0, countwrite (s,*) xread (s,*) yif (y /= x) res = res + 1x = nearest(x,-huge(x))end doend ifend function test_r8end module test_default_format
