This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 64 bit fortran unformatted on Opteron -- incompatible with 32unformatted

Kyon wrote:

> I figured this out by writing a similar little stub
program to make a fortran unformatted file, noting that I can read -m64 generated unformatted with -m64 code, and -m32 generated unformatted with -m32 code, but I could not switch them. I then looked at the generated files and noted that the first either 4 or 8 bytes was the record length for -m32 and -m64 respectively, and then the files were identical from that point on.

Yep, unfortunately, we figured this out too late to fix it: It would make it impossible for people on 64-bit systems using GCC/g77 version n to read their files generated by programs compiled by GCC/g77 version n-1. We thought this was the lesser problem of the two, so we kept the (unfortunate) code in libf2c.

Now an interesting question is how we are going to treat this with gfortran: On the one hand we can do it right (use one record length size on 32-bit and 64-bit systems), but then people on 64-bit systems can't read their g77 generated unformatted files - or we could do the same as libf2c and be stuck with the above problem.

On the third hand, I have received requests for 64-bit record lengths on either system so that larger-than-2-Gbyte records are possible.

So many choices, so little time ....

Toon Moene - - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77:
A maintainer of GNU Fortran 95:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]