This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug fortran/31202] Incorrect rounding generated for NINT
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Krister Walfridsson <cato at df dot lth dot se>
- Cc: fxcoudert at gcc dot gnu dot org, gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 5 Aug 2007 23:16:52 +0100
- Subject: Re: [Bug fortran/31202] Incorrect rounding generated for NINT
- References: <Pine.GSO.4.60.0708051516540.23124@igloo.df.lth.se>
Well, we'll see if I broke any non-C99 target :)
Yes, you did. :)
NetBSD does not have lroundl (and not roundl, so lroundl is not
added by
intrinsics/c99_functions.c) with the result that linking with
libgfortran
fails with "undefined reference to `lroundl'".
I've committed a fix as rev. 127227, adding a fallback implentation
to the fallback implentation of roundl (by adding 0.5 and using a
cast to an integer). Tested on i686-cygwin, where the same kind of
failure was observed, by Jerry Delisle.
Let me know if this fix somehow does not improve the situation for you.
Thanks again for the report,
FX