This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[gfortran,patch] Fix code generated for NINT


Attached patch fixes PR31202 by correcting the code generated for calls to the intrinsic NINT (and ANINT). Instead of adding 0.5 and rounding by casting into an integer, we simply call the lround (or llround) functions. A fallback implementation of these functions is provided for libgfortran.

I've bootstrapped and regtested on x86_64-linux, but I'd be glad if someone with a platform without full C99 support, and especiall lround, could test it. I once had access to a sparc-solaris2.9, which fulfilled these criteria, but not more.

OK for mainline?



:ADDPATCH 31202:

Attachment: nint.ChangeLog
Description: Binary data

Attachment: nint.diff
Description: Binary data


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