------- Comment #1 from carrot at google dot com 2009-06-20 03:56 ------- Created an attachment (id=18027) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18027&action=view) test case
The command line options are: -march=armv5te -mthumb -Os
At the end of the function we can see
b .L3 // This one can be replaced by pop {pc}
.L5:
mov r0, #1
.L3:
@ sp needed for prologue
pop {pc}
With option -O2 we can get similar result.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40499
