I biffed the ChangeLog on this with a flip of two digits on the PR
number (fixed).
Anyway, the following was committed as obvious to trunk. The
BUF_STACK_SZ I bumped up because I noticed on PR85840 test case that
even small kind floats were asking for a buffer size of 323. This avoids
a few allocs for every write operation.
2018-05-26 Jerry DeLisle <jvdeli...@gcc.gnu.org>
PR libgfortran/85906
* io/write.c (write_integer): Initialise the fnode format to
FMT_NONE, used for list directed write.
(BUF_STACK_SZ): Bump default buffer size up to avoid allocs on
small stuff.
--- trunk/libgfortran/io/write.c 2018/05/26 17:30:52 260793
+++ trunk/libgfortran/io/write.c 2018/05/26 18:22:18 260795
@@ -1348,6 +1348,7 @@
}
f.u.integer.w = width;
f.u.integer.m = -1;
+ f.format = FMT_NONE;
write_decimal (dtp, &f, source, kind, (void *) gfc_itoa);
}
@@ -1465,7 +1466,7 @@
/* Floating point helper functions. */
-#define BUF_STACK_SZ 256
+#define BUF_STACK_SZ 384
static int
get_precision (st_parameter_dt *dtp, const fnode *f, const char
*source, int kind)