projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19fdd3e
)
(optimize_bit_field_compare): Preserve volatility of bitfield.
author
Richard Kenner
<kenner@gcc.gnu.org>
Tue, 27 Jul 1993 20:42:34 +0000
(16:42 -0400)
committer
Richard Kenner
<kenner@gcc.gnu.org>
Tue, 27 Jul 1993 20:42:34 +0000
(16:42 -0400)
From-SVN: r5005
gcc/fold-const.c
patch
|
blob
|
history
diff --git
a/gcc/fold-const.c
b/gcc/fold-const.c
index 5f23e98ff955b23040d877440c6b340d6a41ade1..a88b6197efcebd7d7a77dc921a01ac30320a611f 100644
(file)
--- a/
gcc/fold-const.c
+++ b/
gcc/fold-const.c
@@
-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,