[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / convert_2.f90
blob9f90606885aca5ca6b030954e9e0990e34dfdc1e
1 ! { dg-do run }
2 ! Check for correct ordering of character variables with CONVERT
4 program main
5 implicit none
6 integer, parameter :: two_swap = 2**25
7 integer(kind=4) i,j
8 character(len=2) :: c,d
9 open(20,file="convert.dat",form="unformatted",convert="swap") ! { dg-warning "CONVERT" }
10 write (20) "ab"
11 close (20)
12 open(20,file="convert.dat",form="unformatted",access="stream")
13 read(20) i,c,j
14 if (i .ne. two_swap .or. j .ne. two_swap .or. c .ne. "ab") call abort
15 close (20)
16 open(20,file="convert.dat",form="unformatted",convert="swap") ! { dg-warning "CONVERT" }
17 read (20) d
18 close (20,status="delete")
19 if (d .ne. "ab") call abort
20 end program main