aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-operands.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f178518..a8a5231 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-23 Mark Mitchell <mark@codesourcery.com>
+
+ PR 22000
+ * tree-ssa-operands.c (get_expr_operands): Check the volatility of
+ the FIELD_DECL and set s_ann->has_volatile_ops accordingly.
+
2005-06-24 Jan Hubicka <jh@suse.cz>
* opts.c (decode_options): Enable unit-at-a-time by default at -O1.
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 12bfc78..2e263cf 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1346,7 +1346,11 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
flags & ~opf_kill_def);
if (code == COMPONENT_REF)
- get_expr_operands (stmt, &TREE_OPERAND (expr, 2), opf_none);
+ {
+ if (TREE_THIS_VOLATILE (TREE_OPERAND (expr, 1)))
+ s_ann->has_volatile_ops = true;
+ get_expr_operands (stmt, &TREE_OPERAND (expr, 2), opf_none);
+ }
return;
}
case WITH_SIZE_EXPR: