https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85344
Bug ID: 85344
Summary: Constant constraint check sign extends unsigned
constant input operands
Product: gcc
Version: 8.0.1
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: thopre01 at gcc dot gnu.org
Reporter: thopre01 at gcc dot gnu.org
Target Milestone: ---
Target: arm-none-eabi
Hi,
Compiling the following piece of code with -mthumb -mcpu=cortex-m0 generates an
"impossible constraint in 'asm' error"
void
foo (void)
{
__asm( "%0" :: "I" ((unsigned char) 0x80));
}
It appears that although the operand is unsigned, it gets sign extended to
perform the constraint check.