https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14907
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Nicholas Miell from comment #4)
> This also occurs on AMD64 without any special attributes (the ABI passes
> params in registers already).
>
> When compiling:
> extern char c2(char);
> char c1(char c) { return c2(c); }
>
> with gcc -Wall -O2 -S tail-char.c
> using gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
>
> The result is:
> c1:
> subq $8, %rsp
> movsbl %dil,%edi
> call c2
> addq $8, %rsp
> movsbl %al,%eax
> ret
Since c2 isn't a tail call, promotion may be necessary.