http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50384

--- Comment #3 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-28 
20:17:20 UTC ---
(In reply to comment #2)
> The issue with comment #1 is simple, f is not being marked as a tail call.

Marking it as a tail call would indeed work for that case. In this slight
variation however, I get a similar long copying to move the return value to an
argument for the next call, where I would expect the compiler to just move the
64bit register that contains it.

#include <array>
typedef std::array<char,7> X;
void h(X);
X f(X,X);
void g(X a,X b){h(f(a,b));}

Reply via email to