From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29757 invoked by alias); 7 Oct 2002 03:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 29731 invoked by uid 71); 7 Oct 2002 03:06:01 -0000 Resent-Date: 7 Oct 2002 03:06:01 -0000 Resent-Message-ID: <20021007030601.29730.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, bregor@sf.anu.edu.au Received: (qmail 28935 invoked by uid 61); 7 Oct 2002 03:04:04 -0000 Message-Id: <20021007030404.28934.qmail@sources.redhat.com> Date: Sun, 06 Oct 2002 20:06:00 -0000 From: bregor@sf.anu.edu.au Reply-To: bregor@sf.anu.edu.au To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/8156: -mcpu=pentium4 generates wrong fp results in glibc-2.3 X-SW-Source: 2002-10/txt/msg00232.txt.bz2 List-Id: >Number: 8156 >Category: optimization >Synopsis: -mcpu=pentium4 generates wrong fp results in glibc-2.3 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Sun Oct 06 20:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Roger Brown >Release: gcc (GCC) 3.2.1 20021004 (prerelease) >Organization: >Environment: Linux-2.4.19-pre10 HJL's binutils-2.13.90.0.4 glibc-2.3 release source code >Description: *** This may be a duplicate report but the original seems to have got lost. After building the released source for glibc-2.3, with "gcc (GCC) 3.2.1 20021004 (prerelease)", and the -mcpu=pentium4 -march=pentium4 switches, make check discovered many serious errors for the floating-point special functions (see below). The same build, with -mcpu=i686 -march=i686 failed with an assembler error. With -mcpu and -march left at the default values, both the build and check are clean. Other software details: O/S linux-2.4.19-pre10 and HJL's Linux-binutils-2.13.90.0.4. The actual "check" failure was: GCONV PATH=/Main/Glibc/glibc-2.3/Build/iconvdata LC ALL=C /Main/Glibc/glibc-2.3/Build/elf/ld-linux.so.2 --library-path /Main/Glibc/glibc-2.3/Build:/Main/Glibc/glibc-2.3/Build/math: /Main/Glibc/glibc-2.3/Build/elf:/Main/Glibc/glibc-2.3/Build/dlfcn: /Main/Glibc/glibc-2.3/Build/nss:/Main/Glibc/glibc-2.3/Build/nis: /Main/Glibc/glibc-2.3/Build/rt:/Main/Glibc/glibc-2.3/Build/resolv: /Main/Glibc/glibc-2.3/Build/crypt:/Main/Glibc/glibc-2.3/Build/linuxthreads /Main/Glibc/glibc-2.3/Build/math/test-idouble > /Main/Glibc/glibc-2.3/Build/math/test-idouble.out make[2]: *** [/Main/Glibc/glibc-2.3/Build/math/test-idouble.out] Error 139 The errors reported in test-idouble.out are alarming ! The first part reads: testing double (without inline functions) Failure: Test: cosh (0.75) == 1.29468328467684468784170818539018176 Result: is: 2.11700001661267478426e+00 0x1.0ef9db467dcf80000000p+1 should be: 1.29468328467684479222e+00 0x1.4b705d1e5d6a80000000p+0 difference: 8.22316731935829992040e-01 0x1.a506b2dd3c6900000000p-1 ulp : 3703385327526728.0000 max.ulp : 0.0000 Maximal error of `cosh' is : 3703385327526728 ulp accepted: 0 ulp Failure: sinh (-inf) == -inf: Exception "Invalid operation" set Failure: Test: sinh (-inf) == -inf Result: is: nan nan should be: -inf -inf Failure: Test: sinh (0.75) == 0.822316731935829980703661634446913849 and it gets much worse, much worse !! Specific *.i files etc can be provided. >How-To-Repeat: Build glibc-2.3 with -mcpu=pentium4 -march=pentium4 >Fix: >Release-Note: >Audit-Trail: >Unformatted: