Richard Guenther writes:
> We obviously disagree about what the ABI specifies. r126480 made
> the C/C++ frontend behavior the same as other frontends behavior
> (for example Fortran behavior, which I explicitly checked). As GCC
> supports both promoting function return values or not in the
> backends and the x86 backend explicitly does _not_ enable this
> promotion it agrees with my reading of the ABI.
But the ABI isn't in doubt: it is required to
Functions pass all integer-valued arguments as words, expanding or
padding signed or unsigned bytes and halfwords as needed'
and this surely applies to return values as well as arguments passed
to functions. It is utterly perverse to assume that return values are
treated differently from arguments passed to functions. So if the
back end isn't promoting return values then the back end is wrong.