On Tue, Apr 15, 2014 at 09:53:16PM +0100, Richard Sandiford wrote:
> As Robert pointed out here:
> 
>     http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00416.html
> 
> we're a bit too eager when folding stuff into an 'X' constraint.
> The value at expand time is sensible, but after that asm_operand_ok
> allows arbitrary rtx expressions, including any number of registers
> as well as MEMs with unchecked addresses.
> 
> This is a target-independent problem, as shown by the testcase below.
> Reload would give bogus "impossible constraint in asm" errors
> while LRA ICEs.
> 
> Tested on x86_64-linux-gnu.  OK to install?

But then what will be "X" good for compared to "gin" or similar?
X constraint is meant for operands that aren't really needed, trying to
print is a user error.

I guess the documentation agrees with this:

'X'
     Any operand whatsoever is allowed, even if it does not satisfy
     'general_operand'.  This is normally used in the constraint of a
     'match_scratch' when certain alternatives will not actually require
     a scratch register.

So I think we should just error out if somebody tries to print something
that satisfies X constraint.

        Jakub

Reply via email to