From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1047 invoked by alias); 7 Oct 2002 04:46:02 -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 1032 invoked by uid 71); 7 Oct 2002 04:46:02 -0000 Date: Sun, 06 Oct 2002 21:46:00 -0000 Message-ID: <20021007044602.1031.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Andreas Jaeger Subject: Re: optimization/8156: -mcpu=pentium4 generates wrong fp results in glibc-2.3 Reply-To: Andreas Jaeger X-SW-Source: 2002-10/txt/msg00237.txt.bz2 List-Id: The following reply was made to PR optimization/8156; it has been noted by GNATS. From: Andreas Jaeger To: bregor@sf.anu.edu.au Cc: gcc-gnats@gcc.gnu.org Subject: Re: optimization/8156: -mcpu=pentium4 generates wrong fp results in glibc-2.3 Date: Mon, 07 Oct 2002 06:45:15 +0200 bregor@sf.anu.edu.au writes: >>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. Can you send information about the assembler error? Do you have a small testcase for this? > 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 A segmentation fault as result of test-idouble.out? That's strange. > 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 Can you nail down what goes wrong? Is cosh miscompiled (the source is in sysdeps/ieee754/dbl-64/e_cosh.c) or one of the functions it's calling? > 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. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj