public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/12839] New: [gfortran] incorrect IO of Inf
@ 2003-10-30 12:28 jv244 at cam dot ac dot uk
  2003-10-31  0:56 ` [Bug fortran/12839] " pinskia at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: jv244 at cam dot ac dot uk @ 2003-10-30 12:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [gfortran] incorrect IO of Inf
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org

The following program should print 
Inf
(or similar) not
+++++++

   REAL a,b
   a=0.0
   b=1.0/a   ! b=inf
   write(6,*) b
   write(6,'(G12.5)') b
   END


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

* [Bug fortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
@ 2003-10-31  0:56 ` pinskia at gcc dot gnu dot org
  2003-11-18  7:31 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-31  0:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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

* [Bug fortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
  2003-10-31  0:56 ` [Bug fortran/12839] " pinskia at gcc dot gnu dot org
@ 2003-11-18  7:31 ` pinskia at gcc dot gnu dot org
  2004-02-12  0:03 ` [Bug libfortran/12839] " bdavis9659 at comcast dot net
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-18  7:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-18 07:31 -------
I get:
 ++++++++++++++
 +++++++++++
so confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-18 07:31:12
               date|                            |


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
  2003-10-31  0:56 ` [Bug fortran/12839] " pinskia at gcc dot gnu dot org
  2003-11-18  7:31 ` pinskia at gcc dot gnu dot org
@ 2004-02-12  0:03 ` bdavis9659 at comcast dot net
  2004-02-15 12:07   ` Toon Moene
  2004-02-15 12:07 ` toon at moene dot indiv dot nluug dot nl
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 17+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-02-12  0:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis9659 at comcast dot net  2004-02-12 00:02 -------
Is this mandated by the F90 standard or just "convention" ?

looking at gcc/libgfortran/io/write.c;

the field is all "+" for pos infinity, all "-" for neg infinity, and "Nan" for
the other case.  

So, it was a very explicit decision when this code was written.

If it is not required by the standard, perhaps this is not a bug and just needs
to be explained in the info page.

regards,
bud davis

-- 


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


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

* Re: [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2004-02-12  0:03 ` [Bug libfortran/12839] " bdavis9659 at comcast dot net
@ 2004-02-15 12:07   ` Toon Moene
  0 siblings, 0 replies; 17+ messages in thread
From: Toon Moene @ 2004-02-15 12:07 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

bdavis9659 at comcast dot net wrote:
> ------- Additional Comments From bdavis9659 at comcast dot net  2004-02-12 00:02 -------
> Is this mandated by the F90 standard or just "convention" ?
> 
> looking at gcc/libgfortran/io/write.c;
> 
> the field is all "+" for pos infinity, all "-" for neg infinity, and "Nan" for
> the other case.  
> 
> So, it was a very explicit decision when this code was written.
> 
> If it is not required by the standard, perhaps this is not a bug and just needs
> to be explained in the info page.

No, it needs to be changed in light of the changes we made to the 
Fortran 2003 draft last summer.

It's better if we follow this from the start.

Cheers,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2004-02-12  0:03 ` [Bug libfortran/12839] " bdavis9659 at comcast dot net
@ 2004-02-15 12:07 ` toon at moene dot indiv dot nluug dot nl
  2004-02-29 16:37 ` bdavis9659 at comcast dot net
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: toon at moene dot indiv dot nluug dot nl @ 2004-02-15 12:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From toon at moene dot indiv dot nluug dot nl  2004-02-15 12:07 -------
Subject: Re:  [gfortran] incorrect IO of Inf

bdavis9659 at comcast dot net wrote:
> ------- Additional Comments From bdavis9659 at comcast dot net  2004-02-12 00:02 -------
> Is this mandated by the F90 standard or just "convention" ?
> 
> looking at gcc/libgfortran/io/write.c;
> 
> the field is all "+" for pos infinity, all "-" for neg infinity, and "Nan" for
> the other case.  
> 
> So, it was a very explicit decision when this code was written.
> 
> If it is not required by the standard, perhaps this is not a bug and just needs
> to be explained in the info page.

No, it needs to be changed in light of the changes we made to the 
Fortran 2003 draft last summer.

It's better if we follow this from the start.

Cheers,



-- 


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2004-02-15 12:07 ` toon at moene dot indiv dot nluug dot nl
@ 2004-02-29 16:37 ` bdavis9659 at comcast dot net
  2004-05-06 21:19 ` bdavis at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-02-29 16:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis9659 at comcast dot net  2004-02-29 16:37 -------
proposed patch:

http://gcc.gnu.org/ml/fortran/2004-02/msg00066.html

-- 


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2004-02-29 16:37 ` bdavis9659 at comcast dot net
@ 2004-05-06 21:19 ` bdavis at gcc dot gnu dot org
  2004-06-07  0:28 ` bdavis at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-05-06 21:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bdavis9659 at comcast dot
                   |dot org                     |net
             Status|NEW                         |ASSIGNED


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2004-05-06 21:19 ` bdavis at gcc dot gnu dot org
@ 2004-06-07  0:28 ` bdavis at gcc dot gnu dot org
  2004-06-12 12:51 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-06-07  0:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-06-07 00:28 -------
test re-written to work with current functionality of gfortran.

proposed patch here:

http://gcc.gnu.org/ml/fortran/2004-06/msg00040.html

-- 


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (6 preceding siblings ...)
  2004-06-07  0:28 ` bdavis at gcc dot gnu dot org
@ 2004-06-12 12:51 ` cvs-commit at gcc dot gnu dot org
  2004-06-12 19:48 ` bdavis at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-12 12:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-12 12:50 -------
Subject: Bug 12839

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bdavis@gcc.gnu.org	2004-06-12 12:50:54

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/io : write.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.fortran-torture/execute: nan_inf_fmt.f90 

Log message:
	2004-06-12  Bud Davis  <bdavis9659@comcast.net>
	
	PR gfortran/12839
	* gfortran.fortran-torture/execute/nan_inf_fmt.f90: New test.
	* io/write.c(write_float): format inf and nan IAW F2003.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.25&r2=1.26
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3843&r2=1.3844
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (7 preceding siblings ...)
  2004-06-12 12:51 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-12 19:48 ` bdavis at gcc dot gnu dot org
  2004-06-13 13:15 ` bdavis at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-06-12 19:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-06-12 19:47 -------
looks like this is stil broken on freebsd. the finite() function does not detect
+  or minus.

please do not close yet.


--bud davis

-- 


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


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

* [Bug libfortran/12839] [gfortran] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (8 preceding siblings ...)
  2004-06-12 19:48 ` bdavis at gcc dot gnu dot org
@ 2004-06-13 13:15 ` bdavis at gcc dot gnu dot org
  2004-06-28  1:38 ` [Bug libfortran/12839] " cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-06-13 13:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-06-13 13:15 -------


http://gcc.gnu.org/ml/fortran/2004-06/msg00120.html

the saga continues.



--bud


-- 


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


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

* [Bug libfortran/12839] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (9 preceding siblings ...)
  2004-06-13 13:15 ` bdavis at gcc dot gnu dot org
@ 2004-06-28  1:38 ` cvs-commit at gcc dot gnu dot org
  2004-06-28  7:36 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-28  1:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-28 01:30 -------
Subject: Bug 12839

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bdavis@gcc.gnu.org	2004-06-28 01:30:26

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

Log message:
	2004-06-27  Bud Davis  <bdavis9659@comcast.net>
	
	PR gfortran/12839
	* io/write.c (write_float): check signbit for Infinity.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.42&r2=1.43
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.6&r2=1.7



-- 


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


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

* [Bug libfortran/12839] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (10 preceding siblings ...)
  2004-06-28  1:38 ` [Bug libfortran/12839] " cvs-commit at gcc dot gnu dot org
@ 2004-06-28  7:36 ` pinskia at gcc dot gnu dot org
  2004-06-28 12:59 ` bdavis at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-28  7:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-28 07:28 -------
So is this fixed now?

-- 


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


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

* [Bug libfortran/12839] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (11 preceding siblings ...)
  2004-06-28  7:36 ` pinskia at gcc dot gnu dot org
@ 2004-06-28 12:59 ` bdavis at gcc dot gnu dot org
  2004-06-28 16:11 ` pinskia at gcc dot gnu dot org
  2004-07-15 18:50 ` tobi at gcc dot gnu dot org
  14 siblings, 0 replies; 17+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-06-28 12:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-06-28 11:57 -------
yes.

works FreeBSD 5.2 and i686/linux/gnu.

can be closed...


--bud davis

-- 


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


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

* [Bug libfortran/12839] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (12 preceding siblings ...)
  2004-06-28 12:59 ` bdavis at gcc dot gnu dot org
@ 2004-06-28 16:11 ` pinskia at gcc dot gnu dot org
  2004-07-15 18:50 ` tobi at gcc dot gnu dot org
  14 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-28 16:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-28 16:08 -------
Fixed.

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


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


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

* [Bug libfortran/12839] incorrect IO of Inf
  2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
                   ` (13 preceding siblings ...)
  2004-06-28 16:11 ` pinskia at gcc dot gnu dot org
@ 2004-07-15 18:50 ` tobi at gcc dot gnu dot org
  14 siblings, 0 replies; 17+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-15 18:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 12839 depends on bug 15129, which changed state.

Bug 15129 Summary: assumed size characters passed to subroutines incorrect
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15129

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

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


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

end of thread, other threads:[~2004-07-15 18:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 12:28 [Bug fortran/12839] New: [gfortran] incorrect IO of Inf jv244 at cam dot ac dot uk
2003-10-31  0:56 ` [Bug fortran/12839] " pinskia at gcc dot gnu dot org
2003-11-18  7:31 ` pinskia at gcc dot gnu dot org
2004-02-12  0:03 ` [Bug libfortran/12839] " bdavis9659 at comcast dot net
2004-02-15 12:07   ` Toon Moene
2004-02-15 12:07 ` toon at moene dot indiv dot nluug dot nl
2004-02-29 16:37 ` bdavis9659 at comcast dot net
2004-05-06 21:19 ` bdavis at gcc dot gnu dot org
2004-06-07  0:28 ` bdavis at gcc dot gnu dot org
2004-06-12 12:51 ` cvs-commit at gcc dot gnu dot org
2004-06-12 19:48 ` bdavis at gcc dot gnu dot org
2004-06-13 13:15 ` bdavis at gcc dot gnu dot org
2004-06-28  1:38 ` [Bug libfortran/12839] " cvs-commit at gcc dot gnu dot org
2004-06-28  7:36 ` pinskia at gcc dot gnu dot org
2004-06-28 12:59 ` bdavis at gcc dot gnu dot org
2004-06-28 16:11 ` pinskia at gcc dot gnu dot org
2004-07-15 18:50 ` tobi 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).