[Bug fortran/47583] [4.6 Regression] Inquire affected by previous read
jpr at csc dot fi
gcc-bugzilla@gcc.gnu.org
Wed Feb 2 12:48:00 GMT 2011
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;
More information about the Gcc-bugs
mailing list