This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47583] [4.6 Regression] Inquire affected by previous read
- From: "jpr at csc dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 2 Feb 2011 12:48:52 +0000
- Subject: [Bug fortran/47583] [4.6 Regression] Inquire affected by previous read
- Auto-submitted: auto-generated
- References: <bug-47583-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47583
--- Comment #7 from jpr at csc dot fi 2011-02-02 12:48:37 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> Thanks a lot, at least for me this patch seems to solve the problem.
Well, that patch did break the direct_io_1.f90 test case however,
as the ext.dt member setting overwrote the ext.iterator member (when
there was implied do loop in the inquire(iolength=) statement).
This might be better:
Index: io.c
===================================================================
--- io.c (revision 169506)
+++ io.c (working copy)
@@ -3091,7 +3091,8 @@
cp = gfc_get_code ();
cp->op = EXEC_TRANSFER;
cp->expr1 = expr;
- cp->ext.dt = current_dt;
+ if (k != M_INQUIRE)
+ cp->ext.dt = current_dt;
*cpp = cp;
return MATCH_YES;