From owner-freebsd-current@FreeBSD.ORG Mon Jun 25 15:22:20 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 DE06016A400 for ; Mon, 25 Jun 2007 15:22:20 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 4EA0313C487 for ; Mon, 25 Jun 2007 15:22:20 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by ug-out-1314.google.com with SMTP id u2so1461763uge for ; Mon, 25 Jun 2007 08:22:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dd4LhGgHgrIxEU43bXhiM3nP+XxVLP2T0rQYSN1Is87SimwVVMb7moPUQaXtOky/AhUsnazuel7Ya5k27joBc4xCQTj3JZphp0HJclaBPA7OOGdgLp3uPdWP3RZjoMAr/b2WLoIbAJQAyNepOzc0S0t1tZcUQjnI9+pXSrjA6/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HEQqxZ+EvV7DL0HO+PI5QRPSKJMT4ogbh20Hsim5PXIItm5YSVzZPltUWyhOTExTmecJ4C33HGn/3X6aE24MNLekFQcWAzsFbe9uU5tBFAq95XBxbPvvQfT50Jp+ncYRr0+TK4zTD0p90bv8Wc+UbdePCI7EcwVbqnRhgNTcO0g= Received: by 10.82.111.8 with SMTP id j8mr12836064buc.1182784938585; Mon, 25 Jun 2007 08:22:18 -0700 (PDT) Received: by 10.82.190.1 with HTTP; Mon, 25 Jun 2007 08:22:18 -0700 (PDT) Message-ID: <8e5ef5f70706250822o3c80817brd0b0801e3956e9c7@mail.gmail.com> Date: Mon, 25 Jun 2007 11:22:18 -0400 From: "Alexander Kabaev" To: "Andrey Chernov" , "Alexander Kabaev" , current@freebsd.org, kan@freebsd.org In-Reply-To: <20070625145627.GA53685@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070625130913.GA50273@nagual.pp.ru> <20070625133951.GA51324@nagual.pp.ru> <8e5ef5f70706250659v48f64410wb5399985a571087e@mail.gmail.com> <20070625145627.GA53685@nagual.pp.ru> Cc: 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 15:22:21 -0000 On 6/25/07, Andrey Chernov wrote: > 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/ > This one is almost perfect. -- Alexander Kabaev