I have included 2 .i and .s files. One correctly sets the return value (r3) and one does not. The addition of the nonleaf() call causes the return value to be set properly. If you search the .s files for "cort start return" "cort end return" you can see it.
It seems that the return value isn't set properly if the function does not call another function at the out: label. I'm cross compiling from a 32-bit x86 to a 32-bit PowerPC (of the 6xx/74xx variety). -- Summary: return value of some functions not properly set (in r3) Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: critical Priority: P1 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: cort at fsmlabs dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i386-linux GCC target triplet: ppc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19417