URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
! Testcase for the FGETC and FPUTC intrinsics
|
! Testcase for the FGETC and FPUTC intrinsics
|
! { dg-do compile }
|
! { dg-do compile }
|
character(len=5) s
|
character(len=5) s
|
integer st
|
integer st
|
|
|
s = "12345"
|
s = "12345"
|
open(status="scratch")
|
open(status="scratch")
|
write(*,"(A)") "abcde"
|
write(*,"(A)") "abcde"
|
rewind(10)
|
rewind(10)
|
st = fget(s)
|
st = fget(s)
|
if ((st /= 0) .or. (s /= "a ")) call abort
|
if ((st /= 0) .or. (s /= "a ")) call abort
|
st = fget(s)
|
st = fget(s)
|
close(10)
|
close(10)
|
|
|
open(status="scratch")
|
open(status="scratch")
|
s = "12345"
|
s = "12345"
|
st = fput(s)
|
st = fput(s)
|
if (st /= 0) call abort
|
if (st /= 0) call abort
|
st = fput("2")
|
st = fput("2")
|
if (st /= 0) call abort
|
if (st /= 0) call abort
|
st = fput("3 ")
|
st = fput("3 ")
|
if (st /= 0) call abort
|
if (st /= 0) call abort
|
rewind(10)
|
rewind(10)
|
st = fget(s)
|
st = fget(s)
|
if (s(1:1) /= "1") call abort
|
if (s(1:1) /= "1") call abort
|
st = fget(s)
|
st = fget(s)
|
if (s(1:1) /= "2") call abort
|
if (s(1:1) /= "2") call abort
|
st = fget(s)
|
st = fget(s)
|
if ((s(1:1) /= "3") .or. (st /= 0)) call abort
|
if ((s(1:1) /= "3") .or. (st /= 0)) call abort
|
st = fget(s)
|
st = fget(s)
|
if (st /= -1) call abort
|
if (st /= -1) call abort
|
close (10)
|
close (10)
|
|
|
end
|
end
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.