[Bug fortran/41831] Bug with management of NaNs

2009-10-27 Thread michael dot baudin at scilab dot org


--- Comment #3 from michael dot baudin at scilab dot org  2009-10-27 13:32 
---
You are right, this was a bug in the fortran source code.
I cannot add implicit none in this slatec/gamma routine, but 
declaring the return type of the function fixes the bug.
Thank your for looking at this bug.

Best regards,

Michaƫl


-- 


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



[Bug fortran/41831] Bug with management of NaNs

2009-10-26 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2009-10-26 15:10 ---
NaNs don't exist in Fortran's data types except for the Fortran 2003's IEEE
types.


-- 


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



[Bug fortran/41831] Bug with management of NaNs

2009-10-26 Thread kargl at gcc dot gnu dot org


--- Comment #2 from kargl at gcc dot gnu dot org  2009-10-26 22:39 ---
 My conclusion is that there is a problem when the 
 NAN is passed from the C to the fortran.

That's not my conclusion. :)


 double C2F(returnanan)(void)
 {
  (snip)


   PROGRAM test
   DATA ONE/1.0D0/
   DOUBLE PRECISION X
   X = returnanan()

Add 'IMPLICIT NONE' to your code.  The Fortran code is
expecting has implicitly typed returnanan() as REAL.
Your C code has declared returnanan() to return a double.
C's double is not the same thing as Fortran's REAL.

-- 
steve


-- 

kargl at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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