[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #8 from jvdelisle at gcc dot gnu dot org 2007-04-28 03:13 --- Fixed on trunk. -- jvdelisle at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #7 from jvdelisle at gcc dot gnu dot org 2007-04-28 03:04 --- Subject: Bug 31532 Author: jvdelisle Date: Sat Apr 28 03:04:35 2007 New Revision: 124254 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124254 Log: 2007-04-27 Jerry DeLisle PR libfortran/31532 * gfortran.dg/inquire_5.f90: Update test. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/inquire_5.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-04-28 03:03 --- Subject: Bug 31532 Author: jvdelisle Date: Sat Apr 28 03:03:21 2007 New Revision: 124252 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124252 Log: 2007-04-27 Jerry DeLisle <[EMAIL PROTECTED]> PR libfortran/31532 * io/file_pos.c (st_backspace): Set flags.position for end of file condition and use new function update_position. (st_endfile): Use new function update_position. * io/io.h: Add prototype for new function. * io/inquire.c (inquire_via_unit): If not direct access, set NEXTREC to zero. * io/unit.c (update_position): New function to update position info used by inquire. * io/transfer.c (next_record): Fix typo and use new function. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/file_pos.c trunk/libgfortran/io/inquire.c trunk/libgfortran/io/io.h trunk/libgfortran/io/transfer.c trunk/libgfortran/io/unit.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #5 from patchapp at dberlin dot org 2007-04-22 18:20 --- Subject: Bug number PR31532 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01415.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #4 from jvdelisle at gcc dot gnu dot org 2007-04-14 03:10 --- My interpretation of the standard as quoted in the original post. The value of POSITION can only be APPEND if we are positioned just before the EOF record or if there is no EOF record and the position is at it's terminating point. In the case given, there is an EOF record, so that rules that part out. The question then is after the first read, what is the position? The position after the first read is just before the EOF record. So the POSITION in this case should be APPEND. To fix this, we can have the INQUIRE statement attempt to read one more byte. If it is successful, we back up one byte and report ASIS. If we get an EOF trying to read the one more byte, the we report APPEND. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #3 from jvdelisle at gcc dot gnu dot org 2007-04-14 00:40 --- I have not a chance to study this yet, but I will get to it sometime soon. -- jvdelisle at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-04-14 00:40:43 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-04-13 15:24 --- (In reply to comment #0) > If the file has been repositioned since the connection, the > scalar-default-char-variable is assigned a processor-dependent value, > which shall not be REWIND unless the file is positioned at its > initial point and shall not be APPEND unless the file is positioned > so that its endfile record is the next record or at its terminal > point if it has no endfile record. I'm not too skilled at reading normative language, but I guess it only says that if we're not at endfile, if can't be APPEND. It doesn't say that when we're at enfile, it shall be APPEND. Of course, there also is the quality of implementation issue to consider. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532
[Bug libfortran/31532] INQUIRE(...,POSITION=...) not standard conforming
--- Comment #1 from anlauf at gmx dot de 2007-04-10 21:35 --- Created an attachment (id=13351) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13351&action=view) Test program -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31532