autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disabling -O on gcc platforms


From: Christoph Rupp
Subject: Re: disabling -O on gcc platforms
Date: Mon, 18 Dec 2006 11:07:22 +0100 (CET)
User-agent: SquirrelMail/1.4.4

Robert,

thanks for your reply.

> There definitely is no bug in earlier gcc versions which has such an
> effect - thousands of other people would have noticed it. So I suspect
> it is a problem with your code. So testing for the "right" gcc version
> is the wrong "solution".
>
> As always: "it doesn't work" is no error description. Show us the code.

The scenario was like this: one of my unit tests failed, but only if it's
compiled with -O. When i removed -O, it was successfull. And when i
compiled with gcc 4.1.1, it was successfull, too.

I still admit that it *could* be my bug, and i searched the GCC bug
database and didn't found optimization bugs for this GCC version.

My library is a database library, like berkeleyDb. The test which failed
inserts thousands of items, deletes them, looks them up and compares them
to other databases. It would have been possible for me to find the
insert/erase/lookup which caused the bug, but it would have been
time-consuming, especially because this unit test was running quite a few
minutes, if i remember correctly. But i decided against that, because i
don't think that i would have found the bug. Especially because the
program didn't crash, but my internal checks showed that at some point in
time the B+Tree structure was no longer valid.

If you really are interested in looking at the code which caused the
problem, then i'll try to reproduce it, and provide you with the test
program, the test script and all other sources. If not, then i'm willing
to blame my code, because i can't prove that it's a GCC bug. But that's
fine with me, because my current database sources work now, with and
without optimization on GCC 3.4.5.

Regards,
Christoph





reply via email to

[Prev in Thread] Current Thread [Next in Thread]