This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: -frecord-marker


Steve Kargl wrote:
Put these 2 subroutines into separate files.

   subroutine foo1  ! Compile with 32-bit marker
     open(unit=1, file='messy', status='append', ....)
     ! Write a bunch of stuff
     close(1)
   end subroutine foo1

   subroutine foo2  ! Compile with 64-bit marker
     open(unit=1, file='messy', status='append', ....)
     ! Write a bunch of stuff
     close(1)
   end subroutine foo2

What happens when foo2 tries to write to 'messy' after foo1
has already done so?  Do we reread the entire file and convert
to 64-bit markers?  Do we issue a runtime error and abort?
Do we mingle the 32-bit and 64-bit markers in the same file?

What currently happens if gfortran opens (as append) a file that has been written by an Intel-compiled program? Or, for that matter, what happens if the two routines are in programs separately compiled in gfortran -- which is already allowed?


I should think that all of these conditions should be treated in exactly the same way. It should not make any difference to foo2 whether the "messy" file was created by a different routine in the same program, or a separate program also compiled by gfortran, or a different program compiled by a different compiler. In fact, I can't see how it _would_ make a difference.

Similarly, I can't see how it should make a difference to any of this whether or not the routine in question is compiled with gfortran's default record-marker format or with a different format.

- Brooks


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