Bug 19363 - List directed write of Infinity and NaN has regressed
Summary: List directed write of Infinity and NaN has regressed
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 19691 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-10 15:06 UTC by Paul Thomas
Modified: 2005-07-23 22:49 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Thomas 2005-01-10 15:06:50 UTC
program test_list
  real x , y
  x = 0.0
  y = 0.0
  write(*,*,iostat=ier) x /y
  x = 1.0
  write(*,*,iostat=ier) x /y
end program test_list

correctly gave with gfortran 20041010

$ ./a
            NaN
      +Infinity

but now gives, for either NaN or Infinity, with gfortran 20050108

$ ./a
At line 5 of file /cygdrive/d/gfortran/test_list.f90
Internal Error: printf is broken
Comment 1 Andrew Pinski 2005-01-10 15:11:52 UTC
This works for me on powerpc-darwin with a compiler built yesterday.
What target is this?
Comment 2 Paul Thomas 2005-01-10 15:32:50 UTC
(In reply to comment #1)
> This works for me on powerpc-darwin with a compiler built yesterday.
> What target is this?

Bother! Sorry,

It's on Cygwin/Athlon

Comment 3 Andrew Pinski 2005-01-29 12:40:48 UTC
*** Bug 19691 has been marked as a duplicate of this bug. ***
Comment 4 GCC Commits 2005-02-01 09:06:45 UTC
Subject: Bug 19363

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	steven@gcc.gnu.org	2005-02-01 09:06:24

Modified files:
	libgfortran    : ChangeLog libgfortran.h 

Log message:
	2005-02-01  Paul Thomas <paulthomas2@wanadoo.fr>
	
	PR libgfortran/19363
	PR libgfortran/19691
	* libgfortran.h (isfinite): Work around broken isfinite(x) in Cygwin.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.156&r2=1.157
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/libgfortran.h.diff?cvsroot=gcc&r1=1.22&r2=1.23

Comment 5 Steven Bosscher 2005-02-01 09:14:14 UTC
Fixeth now, sirrrrrrs? 
Comment 6 David Billinghurst 2005-02-03 03:07:28 UTC
See http://sources.redhat.com/ml/newlib/2005/msg00099.html for related 
discussion.  This may allow a fix using fixinclude to patch <math.h>.
Comment 7 David Billinghurst 2005-02-03 03:10:22 UTC
The patch improves the cygwin test results

		=== gfortran tests ===

http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg00094.html

XPASS: gfortran.dg/ret_pointer_1.f90 execution test
XPASS: gfortran.dg/ret_pointer_1.f90 execution test
XPASS: gfortran.dg/ret_pointer_1.f90 execution test
XPASS: gfortran.dg/ret_pointer_1.f90 execution test
XPASS: gfortran.dg/ret_pointer_1.f90 execution test
FAIL: gfortran.fortran-torture/execute/forall_3.f90 execution,  -O1

		=== gfortran Summary ===

# of expected passes		5235
# of unexpected failures	1
# of unexpected successes	5
# of expected failures		21
/usr/local/obj/gcc/gcc/testsuite/../gfortran  version 4.0.0 20050202
(experimental)

Comment 8 Andrew Pinski 2005-02-03 03:23:36 UTC
(In reply to comment #6)
> See http://sources.redhat.com/ml/newlib/2005/msg00099.html for related 
> discussion.  This may allow a fix using fixinclude to patch <math.h>.

Yes note this is not a gcc problem, the preprocessed source will have:
typeof(__x) __x = __x;

I will write into the newlib saying that.  Closing as fixed as the testsuite is better