http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58020
--- Comment #12 from richard.koolhans at gmail dot com --- Thanks for doing the test with -O3. That is what I see, also. My tests show: With -O0 everything works. With -O1 everything runs but there are some failures. With -O2 everything runs but there are some failures. With -O3 there is a crash, as noted. I searched and found a suggestion about suppressing optimization within a C code, using the gcc compiler: http://stackoverflow.com/questions/2219829/how-to-prevent-gcc-optimizing-some-statements-in-c I gave my local variables the additional *volatile* attribute and that solved the optimization problem. This is preferred to requiring that -O0 be used in the compile line. That way other optimizations are not suppressed. My understanding ends there.