This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33271] nint_2.f90 abort compiled with -O0
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Sep 2007 17:47:42 -0000
- Subject: [Bug fortran/33271] nint_2.f90 abort compiled with -O0
- References: <bug-33271-14842@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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