------- Comment #7 from jvdelisle at gcc dot gnu dot org 2008-12-04 05:32 ------- I am holding off on committing the patch.
With this test case I have found a nasty problem: ! { dg-do run } ! PR38291 Rejects I/O with POS= if FMT=* character(15) :: sAccess character(1) :: instr open(50, access="stream", form="formatted") write(50, *, pos=1) "Just something" read( 50, *,pos=7) inquire(50, access=sAccess) if (sAccess.ne."STREAM") call abort close(50,status="delete") end With the patch submitted to list, I get unstable execution. Sometimes errors with -m32, sometimes with -m64, Sometimes one execution to the next. I do not know if this is a latent bug or one introduced by the patch. I suspect latent because this is the first time we actually are using dtp->pos even though it has been in the dtp structure. Here is a sample output: $ gfc streamio_16.f90 $ ./a.out At line 7 of file streamio_16.f90 (unit = 50, file = 'fort.50') Fortran runtime error: End of file $ ./a.out $ ./a.out At line 7 of file streamio_16.f90 (unit = 50, file = 'fort.50') Fortran runtime error: End of file $ ./a.out $ ./a.out At line 7 of file streamio_16.f90 (unit = 50, file = 'fort.50') Fortran runtime error: End of file -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38291