NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-alpha/48782: # top [1] Floating point exception (core dumped) top

The following reply was made to PR port-alpha/48782; it has been noted by GNATS.

From: "Naruaki.Etomi" <>
Subject: Re: port-alpha/48782: # top [1] Floating point exception (core
 dumped) top
Date: Mon, 5 May 2014 10:47:03 +0900

 > Ok, libm comes into play as the code calculates the next prime for a given
 > number to get the number of hash buckets.
 > And, unbelievable but true: it does that using double values.
 I'm sorry. Could you explain it again?
 I think that this case is -mieee-with-inexact option bug.
 Please see.
 # more test.c
 #include <stdio.h>
 int main (int argc, char *argv[])
   double a, b, c;
   a = 1.;
   b = 3.;
   c = a/b;
   fprintf (stderr, "%g / %g = %g\n", a, b, c);
 # gcc -v
 Using built-in specs.
 Target: alpha--netbsd
 Configured with:
 --target=alpha--netbsd --enable-long-long --enable-threads
 --with-pkgversion='NetBSD nb1 20120916' --with-system-zlib
 --enable-tls --disable-multilib --disable-symvers
 --disable-libstdcxx-pch --build=x86_64-unknown-netbsd6.0.
 Thread model: posix
 gcc version 4.8.3 (NetBSD nb2 20140304)
 # gcc -mieee-with-inexact test.c
 # ./a.out 1 / 3 = nan
 # cc -V Compaq C V6.5-011 on Compaq Tru64 UNIX V5.1B (Rev. 2650)
 Compiler Driver V6.5-003 (sys) cc Driver
 # cc -ieee_with_inexact test.c
 # ./a.out 1 / 3 = 0.3333
 Please revert this change immediately.
 Alpha architecture is miner target about gcc.
 Nothing needs to be done.
 Can you fix gcc's bug?
 That's very nice of you!
 Naruaki Etomi /

Home | Main Index | Thread Index | Old Index