Hi, The definition of constraint 'X' allows all operands. `X' - Any operand whatsoever is allowed. However, invalid memory operands should not be valid input for 'X'.
Please find attached the patch "X_constraint.patch" which ignores invalid memory operands in constraint 'X'. Fixes the ICE gcc.dg/torture/asm-subreg-1.c on aarch64. Regression Tested on aarch64-elf. No new Regressions. 2012-12-12 Naveen H.S <naveen.hurugalaw...@caviumnetworks.com> *recog.c (asm_operand_ok): Ignore invalid memory operands in constraint 'X' Regards, Naveen
--- gcc/recog.c 2012-12-11 16:12:21.896002274 +0530 +++ gcc/recog.c 2012-12-11 16:38:34.004002088 +0530 @@ -1794,7 +1794,12 @@ asm_operand_ok (rtx op, const char *cons break; case 'X': - result = 1; + /* Match any operands except for invalid memory operands. */ + if (! (MEM_P (op) + && ! memory_address_addr_space_p (GET_MODE (op), + XEXP (op, 0), + MEM_ADDR_SPACE (op)))) + result = 1; break; case 'g':