[PR debug/45673] fix more MEM_REF -fcompare-debug lossage

Alexandre Oliva aoliva@redhat.com
Wed Oct 6 04:51:00 GMT 2010


On Oct  5, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:

> On Tue, Oct 5, 2010 at 6:41 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> On Oct  2, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:
>> 
>>> MEM-REFs _explicitly_ are supposed to ignore the type of the first
>>> operand.
>> 
>> And indeed we do ignore it, except in dumps, in which we look at them to
>> decide whether to print an explicit conversion, and this is where
>> differences kick in.

> The question is why the types differ -g vs. -g0 - I think they should not.

They differ because we consider them the same, and thus mem attr caching
will happily reuse either one for the other.  Debug insns just change
which one gets the shared slot first.

The proposed patch just ensures we don't share the slot, so that
MEM_ATTRs won't vary like this.

> What we could do is to always print the MEM variant for INTEGER_CST
> operand zero.  That would make sense anyway as you have no way
> of guessing the type of operand one by looking at operand zero.
> A patch to do this is pre-approved if it passes bootstrap & regtest.

'k

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer



More information about the Gcc-patches mailing list