------- Comment #2 from sje at cup dot hp dot com 2009-02-11 19:04 ------- This behaviour changed with the patch to fix PR 10907 and I believe that GCC is correct in not doing the tail call optimization. The optimization is not done because ia64_function_ok_for_sibcall returns false and it returns false because bar is defined in a different object file. That object could be in a shared library and could change the GP. Thus GCC needs to save and restore the GP when making calls to another object file and that inhibits the tail call optimization. If bar were defined in the same file GCC could and does do the tail call optimization.
-- sje at cup dot hp dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sje at cup dot hp dot com Status|NEW |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38056