http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42240
--- Comment #18 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2010-11-10 10:38:33 UTC --- (In reply to comment #17) > (In reply to comment #14) > > Created attachment 22339 [details] [details] > > Initial patch to fix the bug > > > > BB reordering pass is suppressed for naked functions. Also suppressed when > > the > > end of epilogue is reached. > > BBreordering (or other passes doing similar things) need not to be disabled. > What do you think? I think BBreordering after the end of epilogue in case of normal functions is little confusing. For e.g., the same testcase with naked removed generates the following code without the patch. .L6: sts (seedram)+1,r25 sts seedram,r24 /* epilogue start */ ret .L11: ldi r24,lo8(0) ldi r25,hi8(0) rjmp .L6 I am not sure what additional advantage we get by allowing this to happen after epilogue. Hence I tried to disable this. Ofcourse, I still need to run entire regression to see if this causes any side affect. > Moreover, there is a gap between reload_completed and > epilogue_completed Agreed. Thanks for catching that. > because the naked return insn is allowed since after reload. I dindn't quite get this. Can you give some example?