The problem is due to prologue_seq in thread_prologue_and_epilogue_insns() being uninitialised and defaulting to the value of '1'. This is an invalid rtx pointer which fails downstream in emit_insn().
On my cross compiler, prologue_seq happened to be a good value and hence inserts wrong code instead of failing.
The change was introduced in gcc-linaro/4.5,revno=99474 as part of the shrink-wrap optimisation. It should happen on other naked functions. Initialising prologue_seq to NULL_RTX should work around the problem.
The problem is due to prologue_seq in thread_ prologue_ and_epilogue_ insns() being uninitialised and defaulting to the value of '1'. This is an invalid rtx pointer which fails downstream in emit_insn().
On my cross compiler, prologue_seq happened to be a good value and hence inserts wrong code instead of failing.
The change was introduced in gcc-linaro/ 4.5,revno= 99474 as part of the shrink-wrap optimisation. It should happen on other naked functions. Initialising prologue_seq to NULL_RTX should work around the problem.