
In message 61C61BB7D4828E4EB72B065C85E3D8A628A4BD@szexchange.schmid-telecom.com you wrote:
I've introduced some printf statements into the U-Boot code to track the program flow. It turns out, that the cpu executes a loop, where there is none present in the source code. Below are some excerpts of the source code and the output of U-Boot. The only explanation I have so far is, that the compiler breaks something. I'm using powerpc-405-linux-gnu-gcc version 3.4.4 for cross compilation on an i386 debian system. Has anybody experienced similar behaviour? Are there any known problems or pitfalls when using this version of gcc?
GCC-3.4.x has shown "funny" behaviour in a couple of cases. I recommend to use a known to be working toolchain and try this. The code you mention has been working fine for a long time on many boards, so I really guess it's a toolchain issue (not necessarily the compiler alone).
Best regards,
Wolfgang Denk