]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stmt.c (expand_asm_operands): Don't warn for memories with queued addresses.
authorRichard Henderson <rth@redhat.com>
Thu, 12 Jun 2003 01:04:32 +0000 (18:04 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 12 Jun 2003 01:04:32 +0000 (18:04 -0700)
        * stmt.c (expand_asm_operands): Don't warn for memories with
        queued addresses.

From-SVN: r67808

gcc/ChangeLog
gcc/stmt.c
gcc/testsuite/gcc.dg/asm-7.c

index 2f83413c1aa30ff2dfad264bedbc39e12aeb04a6..ecbb5be3a9b0dc0e7d402ed04dab7e3cefbca636 100644 (file)
@@ -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
index a69beb0696954911c29ad7cc3e52423943ccf4ed..4561d722230ba935c7147fe802f92735ba1a7b40 100644 (file)
@@ -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
            {
index 007732d5718141cb22c277dd490e098902f15517..42f40e719f909e4d13fc0f376771d7d3a0b5f41c 100644 (file)
@@ -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));