public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37863]  New: Display of a value close to 1 shows 2
@ 2008-10-17 15:18 sylvestre dot ledru at inria dot fr
  2008-10-17 15:43 ` [Bug fortran/37863] " domob at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sylvestre dot ledru at inria dot fr @ 2008-10-17 15:18 UTC (permalink / raw)
  To: gcc-bugs

With the code here:
----
      program pb
      character*10 form
      character*4093 str
      str=' '
      write(form,120) 3,0
      write(str(1:3),form) 1.0d0 - 1.110223024625157D-16
      print *,str(1:10)
 120  format('(f',i2,'.',i2,')')
      end
----

Compiled with gfortran 4.3.2:
the output is 2

With the gfortran 4.2.4
the result is 1 (which is the right one)

$ gfortran-4.3 -o pb pb.f && ./pb 
  2.       
$ gfortran-4.2 -o pb pb.f && ./pb 
  1.


-- 
           Summary: Display of a value close to 1 shows 2
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sylvestre dot ledru at inria dot fr


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] Display of a value close to 1 shows 2
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
@ 2008-10-17 15:43 ` domob at gcc dot gnu dot org
  2008-10-17 15:52 ` [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)' burnus at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: domob at gcc dot gnu dot org @ 2008-10-17 15:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from domob at gcc dot gnu dot org  2008-10-17 15:42 -------
Confirmed on trunk, with this test:

program pb
  write(*,'(F3.0)') 1.0d0 - 1.110223024625157D-16
end

Changing decimals display to a value larger than 0 outputs 1 correctly.


-- 

domob at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |domob at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-10-17 15:42:22
               date|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
  2008-10-17 15:43 ` [Bug fortran/37863] " domob at gcc dot gnu dot org
@ 2008-10-17 15:52 ` burnus at gcc dot gnu dot org
  2008-10-17 19:33 ` jvdelisle at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-10-17 15:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2008-10-17 15:50 -------
Jerry, do you have an idea?


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu dot
                   |                            |org
           Severity|critical                    |normal
           Keywords|                            |wrong-code
           Priority|P3                          |P4
            Summary|Display of a value close to |[4.3/4.4 Regression] Display
                   |1 shows 2                   |of a value close but less to
                   |                            |1 shows 2 with '(F3.0)'
   Target Milestone|---                         |4.3.3


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
  2008-10-17 15:43 ` [Bug fortran/37863] " domob at gcc dot gnu dot org
  2008-10-17 15:52 ` [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)' burnus at gcc dot gnu dot org
@ 2008-10-17 19:33 ` jvdelisle at gcc dot gnu dot org
  2008-10-18  5:30 ` jvdelisle at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-17 19:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jvdelisle at gcc dot gnu dot org  2008-10-17 19:32 -------
I will try to look at this tonight.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
                   ` (2 preceding siblings ...)
  2008-10-17 19:33 ` jvdelisle at gcc dot gnu dot org
@ 2008-10-18  5:30 ` jvdelisle at gcc dot gnu dot org
  2008-10-18  5:33 ` jvdelisle at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-18  5:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2008-10-18 05:28 -------
Subject: Bug 37863

Author: jvdelisle
Date: Sat Oct 18 05:27:23 2008
New Revision: 141208

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141208
Log:
        Fix ChangeLog
2008-10-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org

        PR libfortran/37863
        * io/write_float.def (WRITE_FLOAT): Round to 1.0 correctly.
        * io/io.h (st_parameter_44): Fix id type declaration.

Modified:
    trunk/libgfortran/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
                   ` (3 preceding siblings ...)
  2008-10-18  5:30 ` jvdelisle at gcc dot gnu dot org
@ 2008-10-18  5:33 ` jvdelisle at gcc dot gnu dot org
  2008-10-18 10:47 ` sylvestre dot ledru at inria dot fr
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-18  5:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2008-10-18 05:32 -------
Fixed on trunk. I accidentally committed the patch with the wrong PR number in
the Changelog (37707)

This I will backport to 4.3 in a day.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
                   ` (4 preceding siblings ...)
  2008-10-18  5:33 ` jvdelisle at gcc dot gnu dot org
@ 2008-10-18 10:47 ` sylvestre dot ledru at inria dot fr
  2008-10-19 15:31 ` jvdelisle at gcc dot gnu dot org
  2008-10-19 15:44 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: sylvestre dot ledru at inria dot fr @ 2008-10-18 10:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sylvestre dot ledru at inria dot fr  2008-10-18 10:46 -------
I must say that I am very impressed by your reactivity!
Thanks!


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
                   ` (5 preceding siblings ...)
  2008-10-18 10:47 ` sylvestre dot ledru at inria dot fr
@ 2008-10-19 15:31 ` jvdelisle at gcc dot gnu dot org
  2008-10-19 15:44 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-19 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2008-10-19 15:29 -------
Subject: Bug 37863

Author: jvdelisle
Date: Sun Oct 19 15:28:25 2008
New Revision: 141227

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141227
Log:
2008-10-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org

        PR libfortran/37863
        Backport from trunk.
        * io/write_float.def (WRITE_FLOAT): Round to 1.0 correctly.

2008-10-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org

        PR libfortran/37707
        Backport from trunk.
        * io/list_read.c (nml_get_obj_data): If the first namelist object rank
        is greater than zero, call nml_object_read with the first object rather
        than the sub-object.

Modified:
    branches/gcc-4_3-branch/libgfortran/ChangeLog
    branches/gcc-4_3-branch/libgfortran/io/list_read.c
    branches/gcc-4_3-branch/libgfortran/io/write_float.def


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)'
  2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
                   ` (6 preceding siblings ...)
  2008-10-19 15:31 ` jvdelisle at gcc dot gnu dot org
@ 2008-10-19 15:44 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-19 15:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jvdelisle at gcc dot gnu dot org  2008-10-19 15:43 -------
Fixed on 4.3 and 4.4


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-10-19 15:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-17 15:18 [Bug fortran/37863] New: Display of a value close to 1 shows 2 sylvestre dot ledru at inria dot fr
2008-10-17 15:43 ` [Bug fortran/37863] " domob at gcc dot gnu dot org
2008-10-17 15:52 ` [Bug fortran/37863] [4.3/4.4 Regression] Display of a value close but less to 1 shows 2 with '(F3.0)' burnus at gcc dot gnu dot org
2008-10-17 19:33 ` jvdelisle at gcc dot gnu dot org
2008-10-18  5:30 ` jvdelisle at gcc dot gnu dot org
2008-10-18  5:33 ` jvdelisle at gcc dot gnu dot org
2008-10-18 10:47 ` sylvestre dot ledru at inria dot fr
2008-10-19 15:31 ` jvdelisle at gcc dot gnu dot org
2008-10-19 15:44 ` jvdelisle at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).