https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121470
Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE |--- --- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #4) > yes it is a dup. > Did you read comment #1: Yes, I did read. Please insult yourself. Thanks. > It believe that the problem is in expand_asm_stmt (). > > > The real issue is on rtl const_int are VOIDmode so always sign extended from > the precision of the type. > > *** This bug has been marked as a duplicate of bug 85344 *** 32768 with "the usual promotions" is 32768, not -32768. This is NOT A DUP (not of 85344, anyway). It isn't RTL yet before expand starts, of course, and thins are perfectly fine there. Somehow a value 32768 (not "unsigned short" there btw, just an integer constant, earlier passes have eradicated the cast already!) is expanded as -32768 here.