This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41831] Bug with management of NaNs



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]