[Bug fortran/33271] nint_2.f90 abort compiled with -O0

fxcoudert at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Sep 6 17:47:00 GMT 2007



------- Comment #13 from fxcoudert at gcc dot gnu dot org  2007-09-06 17:47 -------
The following code:

#include <math.h>
#include <stdio.h>

int main (void)
{
  printf ("%ld %ld %ld\n", lround (nextafter(0.5,-9.0)), lround (0.5), lround
(nextafter(0.5,9.0)));
}

should print "0 1 1". On both ppc-aix and ppc-linux (thanks David for testing!)
it says "1 1 1", which is wrong. The powerpc-linux issue is a glibc bug, I
filed it as #4997 (http://www.cygwin.com/bugzilla/show_bug.cgi?id=4997). The
powerpc-aix issue is a AIX libm bug.


-- 


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



More information about the Gcc-bugs mailing list