From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16742 invoked by alias); 19 Dec 2007 20:40:19 -0000 Received: (qmail 16665 invoked by uid 22791); 19 Dec 2007 20:40:18 -0000 X-Spam-Check-By: sourceware.org Received: from rn-out-0910.google.com (HELO rn-out-0102.google.com) (64.233.170.184) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Dec 2007 20:40:14 +0000 Received: by rn-out-0102.google.com with SMTP id j40so434218rnf.20 for ; Wed, 19 Dec 2007 12:40:12 -0800 (PST) Received: by 10.142.211.10 with SMTP id j10mr2834354wfg.202.1198096811151; Wed, 19 Dec 2007 12:40:11 -0800 (PST) Received: by 10.142.14.10 with HTTP; Wed, 19 Dec 2007 12:40:11 -0800 (PST) Message-ID: <4aca3dc20712191240r472ee46ekacf32886a1abd63@mail.gmail.com> Date: Wed, 19 Dec 2007 21:11:00 -0000 From: "Daniel Berlin" To: "Alexandre Oliva" Subject: Re: Designs for better debug info in GCC Cc: "Diego Novillo" , "Mark Mitchell" , "Robert Dewar" , "Ian Lance Taylor" , "Richard Guenther" , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47671BF4.5050704@google.com> <4aca3dc20712181415y3d5c3717s6d73b1335b311313@mail.gmail.com> <4aca3dc20712182207y648f7bbhab9e0af8ad2ff832@mail.gmail.com> <4aca3dc20712190759g748d6e15pa0e5146c3f5ca0ba@mail.gmail.com> X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00598.txt.bz2 On 12/19/07, Alexandre Oliva wrote: > On Dec 19, 2007, "Daniel Berlin" wrote: > > > Here is the easy one: > > > z_5 = a_3 + b_3 > > x_4 = z_5 + c_3 > > > DEBUG(x, x_4) > > > > Reassoc may transform this into: > > > > z_5 = c_3 + b_3 > > x_4 = z_5 + a_3 > > > DEBUG(x, x_4) > > > Now x has the wrong value. > > As Andrew said, no, it doesn't. > Yes, I corrected it later. You didn't address the other one, which is much harder and does require addressing by you. > Now, if z_5 were present in a debug expression, then it would need > adjusting. No different from the adjusting need for any other > instruction in which z_5 was present, though. uh, but if you don't adjust in the fixed examples, DEBUG(x, x_4) will give an invalid value. You can cause this to value to change without ever changing x_4, and do so legally. How do i know i need to change this DEBUG expression.