PR middle-end/38428
* tree-ssa-operands.c (get_expr_operands) <case BIT_FIELD_REF>: Set
gimple_set_has_volatile_ops if the BIT_FIELD_REF is volatile.
* gcc.c-torture/compile/pr38428.c: New test.
From-SVN: r142527
+2008-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/38428
+ * tree-ssa-operands.c (get_expr_operands) <case BIT_FIELD_REF>: Set
+ gimple_set_has_volatile_ops if the BIT_FIELD_REF is volatile.
+
2008-12-07 Ben Elliston <bje@au.ibm.com>
* gthr-single.h (__gthread_once): Adjust prototype to match all
2008-12-06 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/38428
+ * gcc.c-torture/compile/pr38428.c: New test.
+
PR middle-end/38422
* gcc.c-torture/execute/pr38422.c: New test.
--- /dev/null
+/* PR middle-end/38428 */
+
+struct S
+{
+ volatile struct
+ {
+ unsigned int t : 1;
+ } s;
+};
+
+int
+foo (struct S *x)
+{
+ int ret;
+ if (x->s.t)
+ ret = 0;
+ else
+ ret = 10;
+ return ret;
+}
}
case BIT_FIELD_REF:
+ if (TREE_THIS_VOLATILE (expr))
+ gimple_set_has_volatile_ops (stmt, true);
+ /* FALLTHRU */
+
case TRUTH_NOT_EXPR:
case VIEW_CONVERT_EXPR:
do_unary: