From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15839 invoked by alias); 5 Jun 2004 20:21:40 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 15830 invoked from network); 5 Jun 2004 20:21:39 -0000 Received: from unknown (HELO atom.nocdirect.com) (69.73.170.10) by sourceware.org with SMTP; 5 Jun 2004 20:21:39 -0000 Received: from [206.163.121.144] (helo=markab.pegasus.voria.net) by atom.nocdirect.com with esmtp (TLSv1:RC4-MD5:128) (Exim 4.34) id 1BWhfS-0008AV-9P; Sat, 05 Jun 2004 15:21:26 -0500 Subject: Re: Weird optimization bug...? From: Adrian Bentley To: Ian Lance Taylor Cc: gcc-help@gcc.gnu.org In-Reply-To: References: <1086207843.11377.10.camel@localhost> <6.0.3.0.2.20040603062352.02150e10@iplan-mn.corp.adobe.com> <1086283457.18157.13.camel@localhost> <6.0.3.0.2.20040603132957.02031898@iplan-mn.corp.adobe.com> <1086303996.13949.12.camel@localhost> Content-Type: text/plain Message-Id: <1086466898.11861.4.camel@localhost> Mime-Version: 1.0 Date: Sat, 05 Jun 2004 20:21:00 -0000 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - atom.nocdirect.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - voria.com X-Source: X-Source-Args: X-Source-Dir: X-SW-Source: 2004-06/txt/msg00051.txt.bz2 Ok, it's posted (#15837). Hope it helps. Adruab On Thu, 2004-06-03 at 19:59, Ian Lance Taylor wrote: > Adrian Bentley writes: > > > And I'm indirecting off of iter which is being incremented every > > iteration. But for some reason it looks like gcc decided to use the > > original value of iter for the 10th iteration (1 greater than the value > > for length my example is using) inside the sample case I have... (i.e. > > rather than using the incremented value). So it looks like it was > > trying to optimize out an expression that wasn't constant (either in > > attempting to optimize the first if statement out of the loop). It > > doesn't do this when I turn optimization off... so it definitely looks > > like an optimizer bug. > > > > Anyways, I'm not sure why it would do this as iter is being changed > > every iteration. Oh well, I'm gonna manually do some unrolling and > > hopefully it won't break any more. Hope that helps anyone interested in > > the issue. > > If you have time, please submit a bug report. See > http://gcc.gnu.org/bugs.html > > Thanks. > > Ian > >