After several days of hopeless search for a bug, I turn to you hoping someone may point out where what I experience happens.
The problem is in a larger partly interrupt-driven software compiled with avr32-gcc 3.2.3-261 which I could narrow down to a single rather short source file.
The situation materializes as follows:
When I turn off the omit frame pointer optimization for the attached source (with -fno-omit-frame-pointer) at any optimization level, the software runs happily all fine. When I turn it on (by omitting the above with any optimization level above -O0), the software's built-in self checks start to detect memory corruptions in the memories shared across the main and interrupt processes.
I already ruled out the possibility of an always present synchronization problem by that the running time of the various parts are not constant, and during searching for the bug, I turned on and off several other module's optimizations (which obviously changed around the running time of the processes greatly) which did not affect the situation at all (so the bug only seems to occur when I allow omitting the frame pointer for the attached source file).
I also attached two generated ASM compiles of this source file with the lowest possible optimization with the two states of the frame pointer setting. I tested these, one runs, the other produces the bug. My problem is that with my limited assembly knowledge with AVR32 I couldn't spot anything in the variant producing the bug which could be the cause.
I am compiling with the 32 bit Linux version of the above-mentioned avr32-gcc to UC3C1512C. I tried to update it, but currently this tool seems to be inaccessible on Atmel's site (gives me a 84 byte obviously corrupt .tar.bz file). I also would have liked to read a change log of the compiler which I couldn't find - does anyone know if such exists?
Thanks for any help in this matter!