[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-23 Thread jvdelisle at gcc dot gnu dot org


--- Comment #11 from jvdelisle at gcc dot gnu dot org  2007-02-23 18:13 
---
Subject: Bug 30910

Author: jvdelisle
Date: Fri Feb 23 18:13:16 2007
New Revision: 122265

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122265
Log:
2007-02-23  Jerry DeLisle  [EMAIL PROTECTED]

PR libgfortran/30910
* io/write.c (output_float): Add condition of format F only for
special case rounding with zero precision.

Modified:
branches/gcc-4_2-branch/libgfortran/ChangeLog
branches/gcc-4_2-branch/libgfortran/io/write.c


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-23 Thread jvdelisle at gcc dot gnu dot org


--- Comment #12 from jvdelisle at gcc dot gnu dot org  2007-02-23 18:15 
---
Subject: Bug 30910

Author: jvdelisle
Date: Fri Feb 23 18:15:27 2007
New Revision: 122266

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122266
Log:
2007-02-23  Jerry DeLisle  [EMAIL PROTECTED]

PR libgfortran/30910
* gfortran.dg/fmt_zero_precision.f90: Update test.

Modified:
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/fmt_zero_precision.f90


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-23 Thread jvdelisle at gcc dot gnu dot org


--- Comment #13 from jvdelisle at gcc dot gnu dot org  2007-02-23 18:26 
---
Subject: Bug 30910

Author: jvdelisle
Date: Fri Feb 23 18:26:23 2007
New Revision: 122270

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122270
Log:
2007-02-23  Jerry DeLisle  [EMAIL PROTECTED]

PR libgfortran/30910
* io/write.c (output_float): Add condition of format F only for
special case rounding with zero precision.

Modified:
branches/gcc-4_1-branch/libgfortran/ChangeLog
branches/gcc-4_1-branch/libgfortran/io/write.c


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-23 Thread jvdelisle at gcc dot gnu dot org


--- Comment #14 from jvdelisle at gcc dot gnu dot org  2007-02-23 18:31 
---
Subject: Bug 30910

Author: jvdelisle
Date: Fri Feb 23 18:30:57 2007
New Revision: 122271

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122271
Log:
2007-02-23  Jerry DeLisle  [EMAIL PROTECTED]

PR libgfortran/30910
* gfortran.dg/fmt_zero_precision.f90: New test.

Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/fmt_zero_precision.f90
Modified:
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-23 Thread jvdelisle at gcc dot gnu dot org


--- Comment #15 from jvdelisle at gcc dot gnu dot org  2007-02-23 18:35 
---
Fixed on 4.1, 4.2, and 4.3


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-22 Thread pmason at ricardo dot com


--- Comment #5 from pmason at ricardo dot com  2007-02-22 12:40 ---
Get same problem with equivalent P/E format:

write(6,'(1pe6.0)') 1.0e-1


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-22 Thread burnus at gcc dot gnu dot org


--- Comment #6 from burnus at gcc dot gnu dot org  2007-02-22 13:50 ---
I think I found why the output is wrong. The following condition has been
introduced 2006-08-27 with the patch
http://gcc.gnu.org/viewcvs?view=revrevision=116502

Before the if the value is 0.1, afterwards it is 0.0.

  /* Special case when format specifies no digits after the decimal point.  */
  if (d == 0)
{
  if (value  0.5)
value = 0.0;
  else if (value  1.0)
value = value + 0.5;
}

The changelog of that patch is:
PR libgfortran/28354
* io/write.c: Check for special case of zero precision in format
and pre-round the real value.

which fixed the bug 0.9 printed as 0. instead of 1. by format(f3.0)


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-22 Thread burnus at gcc dot gnu dot org


--- Comment #7 from burnus at gcc dot gnu dot org  2007-02-22 13:59 ---
Forget to mention: If I comment out that if-block, the output is correct
(1.E-01). Now you need only to fix it without breaking the other PR ;-)


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-22 Thread jvdelisle at gcc dot gnu dot org


--- Comment #8 from jvdelisle at gcc dot gnu dot org  2007-02-22 14:23 
---
Thanks Tobias.  I suspected a connection with that patch.


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-22 Thread jvdelisle at gcc dot gnu dot org


--- Comment #9 from jvdelisle at gcc dot gnu dot org  2007-02-23 05:43 
---
Subject: Bug 30910

Author: jvdelisle
Date: Fri Feb 23 05:43:16 2007
New Revision: 122250

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122250
Log:
2007-02-22  Jerry DeLisle  [EMAIL PROTECTED]

PR libgfortran/30910
* io/write.c (output_float): Add condition of format F only for
special case rounding with zero precision.

Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/write.c


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-22 Thread jvdelisle at gcc dot gnu dot org


--- Comment #10 from jvdelisle at gcc dot gnu dot org  2007-02-23 06:29 
---
Subject: Bug 30910

Author: jvdelisle
Date: Fri Feb 23 06:29:03 2007
New Revision: 122251

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=122251
Log:
2007-02-22  Jerry DeLisle  [EMAIL PROTECTED]

PR libgfortran/30910
* gfortran.dg/fmt_zero_precision.f90: Update test.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/fmt_zero_precision.f90


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-21 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2007-02-21 14:51 ---
This is a regression. With 4.1.2 20070115 (prerelease) (SUSE Linux) I get
1.E-01, but with today's 4.2 and 4.3 I get 0.E+00.


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||wrong-code
  Known to fail||4.3.0 4.2.0
  Known to work||4.1.2
Summary|Gfortran: ES format not |[Regression 4.2, 4.3]
   |quite right...  |Gfortran: ES format not
   ||quite right...


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-21 Thread jvdelisle at gcc dot gnu dot org


--- Comment #3 from jvdelisle at gcc dot gnu dot org  2007-02-22 01:26 
---
I fixed one similar to this not too long ago with E format.  I will dig that up
while I am at it.


-- 


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



[Bug fortran/30910] [Regression 4.2, 4.3] Gfortran: ES format not quite right...

2007-02-21 Thread jvdelisle at gcc dot gnu dot org


--- Comment #4 from jvdelisle at gcc dot gnu dot org  2007-02-22 01:39 
---
Correction, it was F format with .0 decimal specification, pr28354.


-- 


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