------- Comment #5 from jvdelisle at gcc dot gnu dot org 2010-03-06 01:07 ------- And this:
Index: read.c =================================================================== --- read.c (revision 157247) +++ read.c (working copy) @@ -1030,7 +1030,7 @@ dtp->u.p.sf_read_comma = 0; if (n > 0) - read_sf (dtp, &n, 1); + read_sf (dtp, &n, 0); dtp->u.p.sf_read_comma = 1; dtp->u.p.current_unit->strm_pos += (gfc_offset) n; } Fixes it, however gfortran.dg/read_x_past.f would fail. Tobias can you see how other compilers handle read_x_past.f? I am wondering if my previous interpretations are incorrect. Also the F95 standard says in 10.6.1: "The position specified by an X edit descriptor is forward from the current position. On input, a position beyond the last character of the record may be specified if no characters are transmitted from such positions." This to me means there is no END condition if there is no transfer after the X. I am wondering of this should be an extension, give the END condition with -std=gnu and not with -std=f95? Also, perhaps we should discuss on c.l.f. Obviously it is useful to give this end and not unreasonable, but this contradicts the pr26661 conclusion, or at least we must determine another approach. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43265