------- Comment #3 from jvdelisle at gcc dot gnu dot org  2007-06-30 00:20 
-------
This appears to fix it but I am not sure yet.  More testing.

Index: write.c
===================================================================
--- write.c     (revision 126131)
+++ write.c     (working copy)
@@ -546,7 +546,7 @@ output_float (st_parameter_dt *dtp, cons
    *   digits; if the value is zero, the exponent is 00.
    */
 #ifdef HAVE_SNPRINTF
-  snprintf (buffer, sizeof (buffer), "%+-#" STR(MIN_FIELD_WIDTH) ".*"
+  snprintf (buffer, sizeof (buffer)+1, "%+-#" STR(MIN_FIELD_WIDTH) ".*"
           GFC_REAL_LARGEST_FORMAT "e", ndigits - 1, value);
 #else
   sprintf (buffer, "%+-#" STR(MIN_FIELD_WIDTH) ".*"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32554

Reply via email to