d: Always set ASM_VOLATILE_P on asm statements (PR94425)
[gcc.git] / gcc / d / toir.cc
index 21e31dc93d405afcea7abe2487415918fa3c01e2..6aaf10bf4e4b599539b10befa174dcaf771d5ea4 100644 (file)
@@ -1427,8 +1427,9 @@ public:
     if (s->args == NULL && s->clobbers == NULL)
       ASM_INPUT_P (exp) = 1;
 
-    /* Asm statements are treated as volatile unless 'pure'.  */
-    ASM_VOLATILE_P (exp) = !(s->stc & STCpure);
+    /* All asm statements are assumed to have a side effect.  As a future
+       optimization, this could be unset when building in release mode.  */
+    ASM_VOLATILE_P (exp) = 1;
 
     add_stmt (exp);
   }