Bug 276841 - gfortran compiler ffails to create a correct binary file
gfortran compiler ffails to create a correct binary file
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
5
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-04 14:04 EDT by Jose_Saucedo
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 4.1.2-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-05 11:32:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jose_Saucedo 2007-09-04 14:04:09 EDT
Description of problem:
fortran compiler fails to create a binary file



Version-Release number of selected component (if applicable):


How reproducible:
whenever you create an unformatted file in gfortran (as far as i have been able
to trace it, fc3), the binary file has the same length in bytes as in fc2, fc1,
but it is unreadable by some plotters (supermongo)

create a .f file like this:
program bug
dimension r(3,3)
open(10,file='bug.bin',form='unformatted')
do i=1,3
do j=1,3
r(i,j)=i+j !or any other stuff, just generate a matrix
end do
end do
write(10)3,3
write(10)r
end

You are supposed to have a file which gives you a 2d isocontour map, but what
you get on SM, is something like this:

Data type is float
File cy.rad.trans.abs.chisquare.op.bin's dimensions are 30*26
Data type is float
You have nx = 0, ny = 30
No image is defined
No image is defined
No image is defined
No image is defined
No image is defined
No image is defined
No image is defined
No image is defined
No image is defined

If you do compile the same program in FC1, FC2, or even redhat 9 and 8, you get
a binary file which can be read, plus, the .f compiled on these versions, is
able to run on FC5 with no error output

Steps to Reproduce:
1. generate the matrix on FC5, 4 or 3, either f95 or f77
2. compare the output bin with previous FC versions
3.
  
Actual results:
The binary output has the same size as that prom older versions, nevertheless,
it is unreadable

Expected results:
Should be equal

Additional info:
Comment 1 Jakub Jelinek 2007-09-05 11:32:39 EDT
FC5 is not supported any longer for quite some time.
And current F7 gfortran or F7 testing update gfortran certainly creates bitwise
identical output to what g77 creates.
Particularly
gfortran --version | head -n 1; cat X.f; rm -f bug.bin; gfortran -o X X.f; ./X;
md5sum bug.bin
GNU Fortran (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
      program bug
      dimension r(3,3)
      open(10,file='bug.bin',form='unformatted')
      do i=1,3
      do j=1,3
      r(i,j)=i+j !or any other stuff, just generate a matrix
      end do
      end do
      write(10)3,3
      write(10)r
      end

6d731e7ef16e83c92ab79d53c4b5073b  bug.bin

g77 --version | head -n 1; rm -f bug.bin; g77 -o X2 X.f; ./X2; md5sum bug.bin
GNU Fortran (GCC) 3.4.6 20060404 (Red Hat 3.4.6-7)
6d731e7ef16e83c92ab79d53c4b5073b  bug.bin

Note You need to log in before you can comment on or make changes to this bug.