URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [convert_2.f90] - Rev 384
Compare with Previous | Blame | View Log
! { dg-do run }
! Check for correct ordering of character variables with CONVERT
program main
implicit none
integer, parameter :: two_swap = 2**25
integer(kind=4) i,j
character(len=2) :: c,d
open(20,file="convert.dat",form="unformatted",convert="swap") ! { dg-warning "CONVERT" }
write (20) "ab"
close (20)
open(20,file="convert.dat",form="unformatted",access="stream")
read(20) i,c,j
if (i .ne. two_swap .or. j .ne. two_swap .or. c .ne. "ab") call abort
close (20)
open(20,file="convert.dat",form="unformatted",convert="swap") ! { dg-warning "CONVERT" }
read (20) d
close (20,status="delete")
if (d .ne. "ab") call abort
end program main