From owner-freebsd-current@FreeBSD.ORG Mon Jun 25 21:25:11 2007 Return-Path: X-Original-To: freebsd-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 11F4016A400 for ; Mon, 25 Jun 2007 21:25:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id C367013C447 for ; Mon, 25 Jun 2007 21:25:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l5PLP9QU088873; Mon, 25 Jun 2007 17:25:09 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-current@FreeBSD.org Date: Mon, 25 Jun 2007 17:24:56 -0400 User-Agent: KMail/1.6.2 References: <20070625130913.GA50273@nagual.pp.ru> <467FE3D0.9070006@u.washington.edu> <1182801889.37093.3.camel@dreamland.chief.home> In-Reply-To: <1182801889.37093.3.camel@dreamland.chief.home> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200706251725.02824.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.90.2/3523/Mon Jun 25 10:30:33 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Sascha Holzleiter 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 21:25:11 -0000 On Monday 25 June 2007 04:04 pm, Sascha Holzleiter wrote: > On Mon, 2007-06-25 at 08:48 -0700, Garrett Cooper wrote: > > It's covered in gcc 4.2.1 AFAIK because it's the same / > > similar to the bug with xorg-server's scanpci.c. > > > > Before pursuing your filed bug too much, please switch over > > to the gcc 4.2.1 snapshot provided by Kris a week back, compile > > stuff, and see if the error persists. > > Just a quick test as i just happen to have the new patch running on > this box: > > (aperum@dreamland) /home/aperum> cc -O2 a.c > (aperum@dreamland) /home/aperum> ./a.out > (aperum@dreamland) /home/aperum> cc -O1 a.c > (aperum@dreamland) /home/aperum> ./a.out > MUST BE HERE!!! 7 > MUST BE HERE!!! 8 > MUST BE HERE!!! 9 > > (aperum@dreamland) /home/aperum> cc -v > Using built-in specs. > Target: amd64-undermydesk-freebsd > Configured with: FreeBSD/amd64 system compiler > Thread model: posix > gcc version 4.2.1 20070614 prerelease [FreeBSD] > > So this doesn't seem to be fixed with Kris' snapshot. It seems -fno-tree-rvp can work around it: %cc --version cc (GCC) 4.2.0 20070514 [FreeBSD] Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. %cc -O2 -o test test.c %./test 1: dead 2: beef 3: 1337 4: 4242 %cc -fno-tree-vrp -O2 -o test test.c %./test 1: dead 2: beef 3: 1337 4: 4242 MUST BE HERE!!! 7 MUST BE HERE!!! 8 MUST BE HERE!!! 9 FYI, Jung-uk Kim