From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30360 invoked by alias); 1 Oct 2007 17:16:53 -0000 Received: (qmail 30294 invoked by uid 48); 1 Oct 2007 17:16:44 -0000 Date: Mon, 01 Oct 2007 17:16:00 -0000 Message-ID: <20071001171644.30293.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/33611] [4.1/4.2/4.3 regression] Optimizations generate incorrect code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bangerth at dealii dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg00053.txt.bz2 ------- Comment #3 from bangerth at dealii dot org 2007-10-01 17:16 ------- For once a real floating point bug. In this code double p = 0.422244 * f[a.e]; if (f[0] < p) with a.e=1, f[1]=0.285433, we should calculate p=0.285433. Since f[0]=0.0461109, we shouldn't enter the if-clause, but we do when optimization is on. Since the numbers aren't even close, this isn't due to excess precision or any other floating point instability but a real bug. Funny enough, this was already broken in 2.95, 3.2.3 and 3.3.6 but then worked in 3.4.6 and 4.0.x only to be broken again in 4.1.2. W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Known to fail| |2.95 3.2.3 3.3.6 4.1.2 Known to work| |3.4.6 4.0.4 Last reconfirmed|0000-00-00 00:00:00 |2007-10-01 17:16:44 date| | Summary|Optimizations generate |[4.1/4.2/4.3 regression] |incorrect code |Optimizations generate | |incorrect code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33611