Re: List of optimizations enabled by -O1 seems incorrect

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

 



On 08/13/2009 10:38 PM, Kevin P. Fleming wrote:
Nikos Chantziaras wrote:

Thanks for the tip.  Looking at the generated assembly files, I finally
solved the "mystery": GCC uses SSE/SSE2 instructions to fetch both
variables in one CPU instruction.  It's faster but circumvents
short-circuit "if" rules and Valgrind prints an error.

Then that seems very broken; you should not have to have initialized a
variable to avoid this issue, since short-circuit evaluation is defined
in the C standard.

Damn, I thought that was it. Turns out it has nothing to do with SSE (and the like) since compiling for -m32 -march=i386 and additionally specifying -mno-sse/-mno-sse2/-mno-sse3/etc also triggers the "bug".

It has to be a "hidden" optimization that has no command-line switch. The biggest problem is that I'm not able to produce a test case for it.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux