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

Richard Guenther richard.guenther@gmail.com
Tue Oct 5 09:46:00 GMT 2010


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.

>> So, what is the testcase in question that your patch would fix?
>
> The one in PR 45673.  Should we implement #c2?

I obviously chickened out originally because of the vast amount of testcases
to touch ... and also because of diagnostic messages from late optimization
passes.

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.

Thanks,
Richard.

> --
> 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