2006-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27304
* io/transfer.c (formatted_transfer_scalar): Generate error if data
descriptors are exhausted.
* io/format.c (next_format0): Fix comment.
From-SVN: r113363
+2006-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/27304
+ * io/transfer.c (formatted_transfer_scalar): Generate error if data
+ descriptors are exhausted.
+ * io/format.c (next_format0): Fix comment.
+
2006-04-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/20257
/* next_format()-- Return the next format node. If the format list
* ends up being exhausted, we do reversion. Reversion is only
* allowed if the we've seen a data descriptor since the
- * initialization or the last reversion. We return NULL if the there
+ * initialization or the last reversion. We return NULL if there
* are no more data descriptors to return (which is an error
* condition). */
f = next_format (dtp);
if (f == NULL)
- return; /* No data descriptors left (already raised). */
+ {
+ /* No data descriptors left. */
+ if (n > 0)
+ generate_error (&dtp->common, ERROR_FORMAT,
+ "Insufficient data descriptors in format after reversion");
+ return;
+ }
/* Now discharge T, TR and X movements to the right. This is delayed
until a data producing format to suppress trailing spaces. */