diff mbox series

[committed,libgfortran] PR85906 - Conditional jump depends on uninitialized value in write_integer

Message ID 3b7dec54-140c-4b41-e370-a5d7fe12745f@charter.net
State New
Headers show
Series [committed,libgfortran] PR85906 - Conditional jump depends on uninitialized value in write_integer | expand

Commit Message

Jerry DeLisle May 26, 2018, 6:43 p.m. UTC
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  <jvdelisle@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.


*source, int kind)
diff mbox series

Patch

--- 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