stmt.c (expand_asm_operands): If an ASM has no outputs, then treat it as volatile.
authorJeffrey A Law <law@cygnus.com>
Mon, 15 Dec 1997 15:46:40 +0000 (15:46 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 15 Dec 1997 15:46:40 +0000 (08:46 -0700)
* stmt.c (expand_asm_operands): If an ASM has no outputs, then treat
it as volatile.

From-SVN: r17100

gcc/ChangeLog
gcc/stmt.c

index 76a30f9a014a36d6d72a440e59f213beaaa48814..c9ea3e81d7d73cc04d510f9736801bb0b93f912c 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec 15 08:48:24 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * stmt.c (expand_asm_operands): If an ASM has no outputs, then treat
+       it as volatile.
+
 Mon Dec 15 00:04:48 1997  Jeffrey A Law  (law@cygnus.com)
 
         * haifa-sched.c (remove_dependencies): Set RTX_INTEGRATED_P on
index 18390347831af68d6e743ddec738d0a0faf8048f..32867482f21950426a1468753df8c7a22f4fdc98 100644 (file)
@@ -1421,6 +1421,10 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
   /* The insn we have emitted.  */
   rtx insn;
 
+  /* An ASM with no outputs needs to be treated as volatile.  */
+  if (noutputs == 0)
+    vol = 1;
+
   if (output_bytecode)
     {
       error ("`asm' is invalid when generating bytecode");