+2008-08-20 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Do not mess
+ with TREE_THIS_VOLATILE on shared nodes.
+ (fold_stmt_r): Likewise.
+
2008-08-20 Jakub Jelinek <jakub@redhat.com>
PR c/37171
TREE_TYPE (expr));
if (t)
{
- TREE_THIS_VOLATILE (t) = volatile_p;
+ /* Preserve volatileness of the original expression.
+ We can end up with a plain decl here which is shared
+ and we shouldn't mess with its flags. */
+ if (!SSA_VAR_P (t))
+ TREE_THIS_VOLATILE (t) = volatile_p;
return t;
}
}
if (t)
{
- /* Preserve volatileness of the original expression. */
- TREE_THIS_VOLATILE (t) = volatile_p;
+ /* Preserve volatileness of the original expression.
+ We can end up with a plain decl here which is shared
+ and we shouldn't mess with its flags. */
+ if (!SSA_VAR_P (t))
+ TREE_THIS_VOLATILE (t) = volatile_p;
*expr_p = t;
*changed_p = true;
}