[trunk<-vta] Re: [vta,vta4.3,trunk?] introduce -fcompare-debug

Alexandre Oliva aoliva@redhat.com
Tue Jun 2 17:37:00 GMT 2009


On Jun  2, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:

> On Mon, Jun 1, 2009 at 10:08 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> On Sep 11, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:

>>> This patch introduces a better mechanism to test that the compiler
>>> produces the same output with and without -g than the one I've been
>>> using before.

>>> This could be useful for GCC even without VTA, to detect latent
>>> errors.

> I don't think we should expose all this stuff to our users.

Erhm...  Surely you don't oppose an assertion checking for one of the
fundamental design properties of GCC (-g doesn't change the generated
code), one that is not verified elsewhere, that has already detected
several latent problems, and that is trivially cheap to support although
expensive to actually perform.

So, what is this exposure you're trying to avoid?  Is our objection that
it's offered as a command-line option, rather than as a configure-time
selection?

Sure we do have a number of internal property checkers that are
controlled through configure-time options.  They can be turned on or off
because they do have a run-time impact to support.  This one doesn't, so
it doesn't hurt at all to always have it there, so that it can be
enabled or disabled like any of the other hundreds of flags that are
designed exclusively to aid in compiler debugging, and that are
nevertheless exposed to users.

And then, having it as a compile-time option rather than a
configure-time option means we can get better coverage from our
bootstrap checking without significant impact.  E.g., we can build
stage2 without debug info (builds much faster with the unoptimized
stage1) and then build stage3 with -fcompare-debug (must still produce
the same output to pass bootstrap compare, but can still check that the
internal representation doesn't change because of -g).

Can you please elaborate on your objection, and provide some rationale
for your opinion?

Thanks,

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