]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
write.c (output_float): Update condition to not error when decimal precision in forma...
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Tue, 4 Apr 2006 02:50:23 +0000 (02:50 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Tue, 4 Apr 2006 02:50:23 +0000 (02:50 +0000)
2006-04-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

* io/write.c (output_float): Update condition to not error when
decimal precision in format specifier is zero.

From-SVN: r112656

libgfortran/ChangeLog
libgfortran/io/write.c

index e3c5bbb5aad01bbd8dcdaff83f38d143f765ade0..280f520af31f7a37613a87d167855ca7ac699630 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       * io/write.c (output_float): Update condition to not error when
+       decimal precision in format specifier is zero.
+
 2006-04-01  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        * config/fpu-387.h: Use previously added SSE code in all
index edd2933c3de1fc7ceae3266068f1d562bec49315..39192dde7cdd0a175140a2cebbf0570bedaa32a8 100644 (file)
@@ -473,7 +473,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, GFC_REAL_LARGEST value)
            ndigits - 1, value);
 
   /* Check the resulting string has punctuation in the correct places.  */
-  if (buffer[2] != '.' || buffer[ndigits + 2] != 'e')
+  if (d != 0 && (buffer[2] != '.' || buffer[ndigits + 2] != 'e'))
       internal_error (&dtp->common, "printf is broken");
 
   /* Read the exponent back in.  */