Date: Mon, 23 Sep 2002 15:17:23 -0400 (EDT) From: Mikhail Teteri <mi@aldan.algebra.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: kan@FreeBSD.org Subject: bin/43299: march=pentium4 miscompiles msun/src/e_pow.c Message-ID: <200209231917.g8NJHNMd001235@250-217.customer.cloud9.net>
next in thread | raw e-mail | index | archive | help
>Number: 43299 >Category: bin >Synopsis: march=pentium4 miscompiles msun/src/e_pow.c >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 23 12:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Mikhail Teterin >Release: FreeBSD 5.0-CURRENT i386 >Organization: Virtual Estates, Inc. >Environment: System: FreeBSD misha.murex.com 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Tue Sep 17 11:27:30 EDT 2002 mteterin@misha.murex.com:/misha/obj/misha/src/sys/Misha-g i386 The compiler: Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.2.1 [FreeBSD] 20020916 (prerelease) >Description: If the e_pow.c is compiled with march=pentium4, the pow(3) will be returning 0 whenever y (the second argument) is not an integer. >How-To-Repeat: #include <math.h> #include <stdio.h> double __ieee754_pow(double, double); int main() { printf("%g^%g is %g\n", 2.0, 2.1, __ieee754_pow(2.0, 2.1)); return 0; } cd /usr/src/lib/msun/src cc -O -march=pentium4 t.c e_pow.c -lm ./a.out 2^2.1 is 0 Notice, that I use -lm I eliminate other possible miscompilations from the equation... >Fix: Use -O0 or -mno-sse2: 2^2.1 is 4.28709 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209231917.g8NJHNMd001235>