From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32624 invoked by alias); 1 Mar 2005 21:14:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32567 invoked by uid 48); 1 Mar 2005 21:14:29 -0000 Date: Tue, 01 Mar 2005 21:14:00 -0000 Message-ID: <20050301211429.32566.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050214155119.19953.Thomas.Koenig@online.de> References: <20050214155119.19953.Thomas.Koenig@online.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/19953] Special-case real + complex arithmetic operation (-ffast-math) X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg00121.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-01 21:14 ------- (In reply to comment #17) > Andrew, > > I'm sorry if I'm not making myself clear here. > > The problem that I see is that, on ia64-unknown-linux-gnu and on > i386-pc-linux-gnu, with clean trees, I see code like > > :; > D.2390 = 0.0 / SR.22; > D.2392 = SR.22 + D.2390 * 0.0; > c$real = (D.2371 + D.2372 * D.2390) / D.2392; > c$imag = (D.2372 - D.2371 * D.2390) / D.2392; > > in *.t65.optimized for the simple test case with -O1 and -O3. As you > have stated, this is independent of PR 20139. Yes that code is correct. as 0.0/SR.22 is not 0.0 if SR.22 is NAN. and 0.0 * D.2390 is not 0.0 if D.2390 is NAN. Try -ffast-math or -fno-trapping-math or -ffinite-math-only. > I just rechecked this with the 4.0.0 20050226 (prerelease) snapshot. > You have posted different results, which I cannot reproduce. Yes I posted results with -ffast-math and other options as you described in comment #8: > $ gcc -ffast-math -O3 -fdump-tree-optimized -fno-cx-limited-range -S c-div.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953