===================================================================
@@ -1840,7 +1840,11 @@ asm_operand_ok (rtx op, const char *cons
break;
case 'X':
- result = 1;
+ /* Still enforce memory requirements for non-constant addresses,
+ since we can't reload MEMs with completely arbitrary addresses. */
+ result = (!MEM_P (op)
+ || CONSTANT_P (XEXP (op, 0))
+ || memory_operand (op, VOIDmode));
break;
case 'g':
===================================================================
@@ -0,0 +1,6 @@
+void
+foo (int **x, int y, int z)
+{
+ int *ptr = *x + y * z / 11;
+ __asm__ __volatile__ ("foo %0" : : "X" (*ptr));
+}