https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124467
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Jeffrey A. Law from comment #3) > https://www.nxp.com/docs/en/reference-manual/MCOREABISM.pdf > > Essentially states that extension depends on the underlying type. If the > underlying type is signed, then we're supposed to extend signed. If the > underlying type is unsigned, then we zero extend. The caller is responsible > for extension of sub-word arguments. > > Return values follow the same convention, except the callee handles > extension. > > Based on that it looks like the macro is incorrect. Without reall thinking > abuot it, it would seem like replacing the = 1; with = TYPE_UNSIGNED (TYPE); > would be the right thing to do here. I think UNSIGNEDP is properly set according the type signness before PROMOTE_MODE is used.
