URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [fgetc_2.f90] - Rev 700
Go to most recent revision | Compare with Previous | Blame | View Log
! Testcase for the FGETC and FPUTC intrinsics! { dg-do run }character(len=5) sinteger sts = "12345"open(10,status="scratch")write(10,"(A)") "abcde"rewind(10)st = fgetc(10,s)if ((st /= 0) .or. (s /= "a ")) call abortst = fgetc(10,s)close(10)open(10,status="scratch")s = "12345"st = fputc(10,s)if (st /= 0) call abortst = fputc(10,"2")if (st /= 0) call abortst = fputc(10,"3 ")if (st /= 0) call abortrewind(10)st = fgetc(10,s)if (s(1:1) /= "1") call abortst = fgetc(10,s)if (s(1:1) /= "2") call abortst = fgetc(10,s)if ((s(1:1) /= "3") .or. (st /= 0)) call abortst = fgetc(10,s)if (st /= -1) call abortclose (10)! FGETC and FPUTC on units not opened should not workst = fgetc(12,s)if (st /= -1) call abortst = fputc(12,s)if (st /= -1) call abortend
Go to most recent revision | Compare with Previous | Blame | View Log
