Optimization of conditional access to globals: thread-unsafe?
Andi Kleen
andi@firstfloor.org
Mon Oct 29 14:12:00 GMT 2007
On Mon, Oct 29, 2007 at 03:14:06PM +0300, Tomash Brechko wrote:
> On Mon, Oct 29, 2007 at 12:54:22 +0100, Andi Kleen wrote:
> > See http://gcc.gnu.org/ml/gcc/2007-10/msg00607.html for a test case
> > that shows where it can go horrible wrong (optimized code significantly
> > slower than unoptimized code) Admittedly it is a constructed
> > one, but I don't think it is that unrealistic.
>
> Thanks. I had to change %Lu to %lu, and the example shows the point
> when run multiple times.
Sorry that was a glibc'ism. The correct C99 specifier would be %llu
or %qu for traditional BSD.
-Andi
More information about the Gcc
mailing list