]> gcc.gnu.org Git - gcc.git/commitdiff
(optimize_bit_field_compare): Preserve volatility of bitfield.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 27 Jul 1993 20:42:34 +0000 (16:42 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 27 Jul 1993 20:42:34 +0000 (16:42 -0400)
From-SVN: r5005

gcc/fold-const.c

index 5f23e98ff955b23040d877440c6b340d6a41ade1..a88b6197efcebd7d7a77dc921a01ac30320a611f 100644 (file)
@@ -2421,6 +2421,11 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
      appropriate number of bits and mask it with the computed mask
      (in case this was a signed field).  If we changed it, make a new one.  */
   lhs = make_bit_field_ref (linner, unsigned_type, lnbitsize, lnbitpos, 1);
+  if (lvolatilep)
+    {
+      TREE_SIDE_EFFECTS (lhs) = 1;
+      TREE_THIS_VOLATILE (lhs) = 1;
+    }
 
   rhs = fold (const_binop (BIT_AND_EXPR,
                           const_binop (LSHIFT_EXPR,
This page took 0.071059 seconds and 5 git commands to generate.