On 08/27/2017 09:33 PM, Paul S wrote:
> I've ported gcc to a 16 bit CPU and have all torture tests passing bar
> one, pr52286.c
>
> The offending lines of code are
>
> long a, b = 0;
> asm ("" : "=r" (a) : "0" (0));
I wouldn't use a matching constraint here. Something like this is
probably closer to what you want:
asm ("" : "=r" (a) : "n" (0));
The "n" says accept any immediate integer constant with a compile time
known value.
In fact, I could probably argue that "0" (0) should generate an error as
a constraint -- it's meaningless in that you can't match a constant
integer input to any output.
Jeff