Date: Thu, 23 Sep 2004 07:26:33 GMT From: Patrick Pelissier <ppelissi@caramail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: alpha/72024: LONG_MIN / 1 sends a "Floating exception" Message-ID: <200409230726.i8N7QXTM099742@www.freebsd.org> Resent-Message-ID: <200409230730.i8N7USGv033340@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72024 >Category: alpha >Synopsis: LONG_MIN / 1 sends a "Floating exception" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-alpha >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 23 07:30:27 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Patrick Pelissier >Release: 5.2.1 >Organization: >Environment: spe149.testdrive.hp.com> uname -a FreeBSD spe149.testdrive.hp.com 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Tue Feb 24 07:42:14 GMT 2004 root@mithlond.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC alpha >Description: The following program: #include <limits.h> int f(long a, long b); int main() { return f(LONG_MIN, 1); } int f(long a, long b) { return a / b; } produces a "Floating exception (core dumped)" on alpha-unknown-freebsd5.2.1 (spe149.testdrive.hp.com) with: gcc version 3.4.2 and gcc version 3.3.3 [FreeBSD] 20031106. The test program was compiled without any flags: spe149.testdrive.hp.com> /tmp/make/bin/gcc test3.c spe149.testdrive.hp.com> ./a.out Floating exception (core dumped) spe149.testdrive.hp.com> /tmp/make/bin/gcc -v Reading specs from /tmp/make/lib/gcc/alpha-unknown-freebsd5.2.1/3.4.2/specs Configured with: ./configure --prefix=/tmp/gcc : (reconfigured) ./configure --prefix=/tmp/gcc : (reconfigured) ./configure --prefix=/tmp/make --enable-languages=c Thread model: posix gcc version 3.4.2 The problem seems to be in the internal function "__divq" which produces the exception. (See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17613 ) >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409230726.i8N7QXTM099742>