public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0
@ 2004-09-28 1:34 bdavis at gcc dot gnu dot org
2004-09-28 1:58 ` [Bug libfortran/17706] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-09-28 1:34 UTC (permalink / raw)
To: gcc-bugs
This failure from NIST test FM406:
$ cat c.f
CHARACTER*10 A10VK
A10VK = 'XXXXXXXXXX'
AVS = -0.0001
WRITE(A10VK,39104) AVS
39104 FORMAT(F4.1)
PRINT*,A10VK
END
$ cat c.f
CHARACTER*10 A10VK
A10VK = 'XXXXXXXXXX'
AVS = -0.0001
WRITE(A10VK,39104) AVS
39104 FORMAT(F4.1)
PRINT*,A10VK
END
$ gfc c.f
$./a.out
-0.0
$ g77 c.f
$ ./a.out
0.0
$ gfc --version
GNU Fortran 95 (GCC 4.0.0 20040924 (experimental))
--
Summary: reading a value of 0.0 gives a value of -0.0
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bdavis at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
@ 2004-09-28 1:58 ` pinskia at gcc dot gnu dot org
2004-09-28 2:26 ` bdavis9659 at comcast dot net
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 1:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-28 01:57 -------
Hmm, I don't know if this is really a bug, -0.0001 trouncated to -0.0 unless there is no such thing as
-0.0 in fortran.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
2004-09-28 1:58 ` [Bug libfortran/17706] " pinskia at gcc dot gnu dot org
@ 2004-09-28 2:26 ` bdavis9659 at comcast dot net
2004-09-28 2:31 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-09-28 2:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bdavis9659 at comcast dot net 2004-09-28 02:26 -------
Subject: Re: reading a value of 0.0 gives a value of
-0.0
On Mon, 2004-09-27 at 20:58, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-28 01:57 -------
> Hmm, I don't know if this is really a bug, -0.0001 trouncated to -0.0 unless there is no such thing as
> -0.0 in fortran.
from section 13.5.9, F77 standard:
On output, the representation of a positive or zero internal value in
the field may be prefixed with a plus, as controlled by the S, SP, and
SS edit descriptors (13.5.6) or the processor. The representation of a
negative internal value in the field must be prefixed with a minus.
However, the processor must not produce a negative signed zero in a
formatted output record.
--bud
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
2004-09-28 1:58 ` [Bug libfortran/17706] " pinskia at gcc dot gnu dot org
2004-09-28 2:26 ` bdavis9659 at comcast dot net
@ 2004-09-28 2:31 ` pinskia at gcc dot gnu dot org
2004-09-28 4:12 ` bdavis at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 2:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-28 02:31 -------
Confirmed, then. I did not know fortran that well I was questioning the bug but since you pointted out
the sentence which gives the problem, I now understand that this is a bug, thanks.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-28 02:31:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-09-28 2:31 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 4:12 ` bdavis at gcc dot gnu dot org
2004-10-04 15:32 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-09-28 4:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bdavis at gcc dot gnu dot org 2004-09-28 04:12 -------
proposed patch:
http://gcc.gnu.org/ml/fortran/2004-09/msg00276.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-09-28 4:12 ` bdavis at gcc dot gnu dot org
@ 2004-10-04 15:32 ` cvs-commit at gcc dot gnu dot org
2004-10-04 15:33 ` cvs-commit at gcc dot gnu dot org
2004-10-04 15:55 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-04 15:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-04 15:32 -------
Subject: Bug 17706
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pbrook@gcc.gnu.org 2004-10-04 15:32:13
Modified files:
gcc/testsuite : ChangeLog
libgfortran : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: pr17706.f90
Log message:
2004-10-04 Paul Brook <paul@codesourcery.com>
Bud Davis <bdavis9659@comcast.net>
PR fortran/17706
PR fortran/16434
* io/format.c (parse_format_list): Set repeat count for S, SP, SS,
BN and BZ formats.
* io/write.c (output_float): Don't output minus zero.
libgfortran/
* gfortran/pr17706.f90: New test.
* gfortran.dg/g77/f77-edit-s-out.f: Remove xfail.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4379&r2=1.4380
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr17706.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.95&r2=1.96
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-04 15:32 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-04 15:33 ` cvs-commit at gcc dot gnu dot org
2004-10-04 15:55 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-04 15:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-04 15:33 -------
Subject: Bug 17706
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pbrook@gcc.gnu.org 2004-10-04 15:33:18
Modified files:
gcc/testsuite/gfortran.dg/g77: f77-edit-s-out.f
libgfortran/io : format.c write.c
Log message:
2004-10-04 Paul Brook <paul@codesourcery.com>
Bud Davis <bdavis9659@comcast.net>
PR fortran/17706
PR fortran/16434
* io/format.c (parse_format_list): Set repeat count for S, SP, SS,
BN and BZ formats.
* io/write.c (output_float): Don't output minus zero.
libgfortran/
* gfortran/pr17706.f90: New test.
* gfortran.dg/g77/f77-edit-s-out.f: Remove xfail.
Actually apply the patch this time.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/format.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.15&r2=1.16
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/17706] reading a value of 0.0 gives a value of -0.0
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-10-04 15:33 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-04 15:55 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 15:55 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17706
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-04 15:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-28 1:34 [Bug libfortran/17706] New: reading a value of 0.0 gives a value of -0.0 bdavis at gcc dot gnu dot org
2004-09-28 1:58 ` [Bug libfortran/17706] " pinskia at gcc dot gnu dot org
2004-09-28 2:26 ` bdavis9659 at comcast dot net
2004-09-28 2:31 ` pinskia at gcc dot gnu dot org
2004-09-28 4:12 ` bdavis at gcc dot gnu dot org
2004-10-04 15:32 ` cvs-commit at gcc dot gnu dot org
2004-10-04 15:33 ` cvs-commit at gcc dot gnu dot org
2004-10-04 15:55 ` pinskia 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).