https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97607
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Target| |x86_64-linux Last reconfirmed| |2020-10-28 Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- This is the TARGET_PROMOTE_PROTOTYPES target hook at play, directing the FEs to emit the sign-extension and RTL expansion failing to elide it. Note the x86 ABI does _not_ specify the incoming argument is sign-extended so it only works for functions where all calls are generated by GCC. IMHO TARGET_PROMOTE_PROTOTYPES should go away.