From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7145 invoked by alias); 14 Aug 2009 13:04:52 -0000 Received: (qmail 7059 invoked by uid 22791); 14 Aug 2009 13:04:51 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.digium.com (HELO mail.digium.com) (216.207.245.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Aug 2009 13:04:46 +0000 Received: from [10.24.250.46] by mail.digium.com with esmtp (Exim 4.63) (envelope-from ) id 1MbwSl-0006dF-Rq; Fri, 14 Aug 2009 08:04:55 -0500 Message-ID: <4A8560E6.9050502@digium.com> Date: Fri, 14 Aug 2009 18:23:00 -0000 From: "Kevin P. Fleming" User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Andrew Haley CC: Ian Lance Taylor , gcc-help@gcc.gnu.org Subject: Re: List of optimizations enabled by -O1 seems incorrect References: <4A845609.503@redhat.com> <4A846BBB.5070605@digium.com> <4A847100.1010108@redhat.com> <4A84751C.2040304@digium.com> <4A855449.2070402@digium.com> <4A856016.8060501@redhat.com> In-Reply-To: <4A856016.8060501@redhat.com> OpenPGP: id=05FB8DB2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00146.txt.bz2 Andrew Haley wrote: > gcc looks at > > if (!foo && !bar) > ... > > and turns it into > > if (foo|bar) > goto x; > ... > x: > > So, from Valgrind's point of view, the branch depends on the value of > bar, which is uninitialized. We know that if foo is nonzero there is > no such dependency, but Valgrind would have to do some heavyweight > dependency analysis to figure that one out. Ding-ding-ding... and the winner is, I'm not awake enough yet this morning :-) Thanks for the explanation! -- Kevin P. Fleming Digium, Inc. | Director of Software Technologies 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA skype: kpfleming | jabber: kpfleming@digium.com Check us out at www.digium.com & www.asterisk.org