GCC 4.1.0 initializes another register than the one specified in the definition. I'm not sure it this has also something to do with bug 21596. The same testcase built with GCC 3.4.4 is correct.
Created attachment 11009 [details] ARM/PowerPC .i file
Created attachment 11010 [details] PowerPC .s file
Created attachment 11011 [details] ARM .s file
local register variables don't do what you think they do. Hint they only work with inline-asm.
If you want to use r5 the correct way is to do: register int *foo asm("r5") = 0; void t1(void) { *foo = 1; }