From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19393 invoked by alias); 19 Jul 2005 02:31:36 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 19332 invoked by uid 22791); 19 Jul 2005 02:31:29 -0000 Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.208.78.105) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 19 Jul 2005 02:31:29 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.13.4/8.13.4) with ESMTP id j6J2VRKe088357; Mon, 18 Jul 2005 19:31:27 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.4/8.13.1/Submit) id j6J2VRYH088356; Mon, 18 Jul 2005 19:31:27 -0700 (PDT) (envelope-from sgk) Date: Tue, 19 Jul 2005 02:31:00 -0000 From: Steve Kargl To: fortran@gcc.gnu.org, gcc@gcc.gnu.org Subject: Someone broke complex arithmetic Message-ID: <20050719023127.GA88291@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-SW-Source: 2005-07/txt/msg00805.txt.bz2 This is a heads up. Someone has broken complex arithmetic on mainline. I've just found this problem and unfortunately it will take me some time to cut the test program down to something managable. This could be a gfortran bug or it may be a middle/back end bug. Here's the output from a program that brought the problem to my attention. It uses downward recursion to compute spherical Bessel functions. NAG's F95 compiler n x jn(x) jn(cmplx(x,0)) 0 2.2900E+01 -3.4445E-02 -3.4445E-02 0.0000E+00 1 2.2900E+01 2.5337E-02 2.5337E-02 0.0000E+00 2 2.2900E+01 3.7765E-02 3.7765E-02 0.0000E+00 3 2.2900E+01 -1.7091E-02 -1.7091E-02 0.0000E+00 4 2.2900E+01 -4.2989E-02 -4.2989E-02 0.0000E+00 gfortran mainline n x jn(x) jn(cmplx(x,0)) 0 2.2900E+01 -3.4445E-02 -3.4445E-02 0.0000E+00 1 2.2900E+01 2.5337E-02 3.9638E-02 0.0000E+00 2 2.2900E+01 3.7765E-02 -5.0710E-02 0.0000E+00 3 2.2900E+01 -1.7091E-02 7.3035E-02 0.0000E+00 4 2.2900E+01 -4.2989E-02 -1.2032E-01 0.0000E+00 Notice the 3rd column is foobar. Also note that I'm seeing this problem on i386-*-freebsd and amd64-*-freebsd. -- Steve