From owner-freebsd-current@FreeBSD.ORG Mon Jun 25 14:56:32 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 246F416A41F; Mon, 25 Jun 2007 14:56:32 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 9981D13C45A; Mon, 25 Jun 2007 14:56:31 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l5PEuUFj053738; Mon, 25 Jun 2007 18:56:30 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nagual.pp.ru; s=default; t=1182783390; bh=rqxQ8A1tHIog1yHpk+2Awx5Ka53XYn98f+eEg2W Wpho=; l=876; h=Received:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent; b=gpWU/t1Jqs+t5M7LDEla /z4GHl/UwYR8Gfd2ZRodqJsQQiLkfsJo3j29RbCTypvpKbB0D72NWATZH8iegyQSVj7 NqAWFOSYDxHIO/U9ft7nSE1qWaUydpkXjYQ2ipM48oU6GTLrB0KJLuTy8izEpIt++6d Bgr3SfwSzJmw3ltpM= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l5PEuT2W053737; Mon, 25 Jun 2007 18:56:29 +0400 (MSD) (envelope-from ache) Date: Mon, 25 Jun 2007 18:56:28 +0400 From: Andrey Chernov To: Alexander Kabaev Message-ID: <20070625145627.GA53685@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Alexander Kabaev , current@freebsd.org, kan@freebsd.org References: <20070625130913.GA50273@nagual.pp.ru> <20070625133951.GA51324@nagual.pp.ru> <8e5ef5f70706250659v48f64410wb5399985a571087e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e5ef5f70706250659v48f64410wb5399985a571087e@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: kan@freebsd.org, current@freebsd.org Subject: Re: Silent gcc 4.2.0 loop optimization bug with -O2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2007 14:56:32 -0000 On Mon, Jun 25, 2007 at 09:59:21AM -0400, Alexander Kabaev wrote: > It is trivial to extract a sample for miscompiltations. Just use > -save-temps and cut down the code until you have a simple case. If you > cannot be bothered to do that, nobody else would either, Well... Is this small enough? cc -O2 a.c ./a.out cc -O a.c ./a.out ------------------------------------------------------------------ #include const char *szElem[4]; void main() { float power1[80], total2; int i, j; char sz[80]; for (i = 1; i <= 12; i++) { if (i <= 4) { sprintf(sz, " -%9.7s:", szElem[i-1]); for (j = 1; j < 12; j += 4) total2 += power1[i-1+j]; } else if (i == 6) { } else if (i >= 7 && i <= 9) { printf("MUST BE HERE!!! %d\n", i); } } } ------------------------------------------------------------------- -- http://ache.pp.ru/