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" <nullnilaki%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: martin%duskware.de@localhost
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.
 http://gcc.gnu.org/ml/gcc-bugs/2001-04/msg00408.html
 
 ---
 
 # 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.
 COLLECT_GCC=gcc
 Target: alpha--netbsd
 Configured with:
 /usr/src6/tools/gcc/../../external/gpl3/gcc/dist/configure
 --target=alpha--netbsd --enable-long-long --enable-threads
 --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html
 --with-pkgversion='NetBSD nb1 20120916' --with-system-zlib
 --enable-__cxa_atexit
 --with-mpc-lib=/var/obj/mknative/alpha/usr/src6/external/lgpl3/mpc/lib/libmpc
 
--with-mpfr-lib=/var/obj/mknative/alpha/usr/src6/external/lgpl3/mpfr/lib/libmpfr
 --with-gmp-lib=/var/obj/mknative/alpha/usr/src6/external/lgpl3/gmp/lib/libgmp
 --with-mpc-include=/usr/src6/external/lgpl3/mpc/dist/src
 --with-mpfr-include=/usr/src6/external/lgpl3/mpfr/dist/src
 --with-gmp-include=/usr/src6/external/lgpl3/gmp/lib/libgmp/arch/alpha
 --enable-tls --disable-multilib --disable-symvers
 --disable-libstdcxx-pch --build=x86_64-unknown-netbsd6.0.
 --host=alpha--netbsd
 --with-sysroot=/var/obj/mknative/alpha/usr/src6/destdir.alpha
 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.
 
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/src/lib/libm/Makefile.diff?r1=1.156&r2=1.157&f=h
 
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/src/tests/lib/libm/Makefile.diff?r1=1.21&r2=1.22&f=h
 
 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 / nullnilaki%gmail.com@localhost
 


Home | Main Index | Thread Index | Old Index