diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/stmt.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/asm-7.c | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f83413c1aa..ecbb5be3a9b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-11 Richard Henderson <rth@redhat.com> + + * stmt.c (expand_asm_operands): Don't warn for memories with + queued addresses. + 2003-06-11 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (SUBTARGET_ASM_RELAX_SPEC): Rewrite without diff --git a/gcc/stmt.c b/gcc/stmt.c index a69beb06969..4561d722230 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1765,10 +1765,11 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) else if (!allows_mem) warning ("asm operand %d probably doesn't match constraints", i + noutputs); - else if (GET_CODE (op) == MEM && MEM_VOLATILE_P (op)) + else if (GET_CODE (op) == MEM) { - /* We won't recognize volatile memory as available a - memory_operand at this point. Ignore it. */ + /* We won't recognize either volatile memory or memory + with a queued address as available a memory_operand + at this point. Ignore it: clearly this *is* a memory. */ } else { diff --git a/gcc/testsuite/gcc.dg/asm-7.c b/gcc/testsuite/gcc.dg/asm-7.c index 007732d5718..42f40e719f9 100644 --- a/gcc/testsuite/gcc.dg/asm-7.c +++ b/gcc/testsuite/gcc.dg/asm-7.c @@ -7,12 +7,14 @@ void test(void) register int r2; int i; static int m; + int *p; __asm__ ("" : : "m"(r)); /* { dg-warning "address of register" } */ __asm__ ("" : : "m"(i)); __asm__ ("" : : "m"(m)); __asm__ ("" : : "m"(0)); /* { dg-warning "input without lvalue" } */ __asm__ ("" : : "m"(i+1)); /* { dg-warning "input without lvalue" } */ + __asm__ ("" : : "m"(*p++)); __asm__ ("" : : "g"(r)); __asm__ ("" : : "g"(i)); |