This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Designs for better debug info in GCC


On 12/19/07, Alexandre Oliva <aoliva@redhat.com> wrote:
> On Dec 19, 2007, "Daniel Berlin" <dberlin@dberlin.org> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]