This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/26735] New: -fconvert=swap and implied open
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2006 21:07:31 -0000
- Subject: [Bug libfortran/26735] New: -fconvert=swap and implied open
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat conv-implied-open.f90
program main
implicit none
integer (kind=8) :: i1, i2, i3
write (10) 1_8
close (10)
open (10,status="old", form="unformatted", access="direct", recl=8)
read (10,rec=1) i1
read (10,rec=2) i2
read (10,rec=3) i3
print '(3Z16,1X)',i1,i2,i3
end program main
$ gfortran conv-implied-open.f90
$ ./a.out
8 1 8
$ gfortran -fconvert=swap conv-implied-open.f90
$ ./a.out
800000000000000 100000000000000 800000000000000
The second call is incorrect. The lack of an open
statement means that the information about the byte-swapping
isn't picked up.
This is not really all that serious, because I suspect most people
will give their files descriptive names if they want to move them
across architectures.
--
Summary: -fconvert=swap and implied open
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26735