+2010-11-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/46217
+ * tree-ssa.c (non_rewritable_mem_ref_base): Check if volatile
+ flag matches.
+ (execute_update_addresses_taken): Likewise.
+
2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
PR bootstrap/44335
+2010-11-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/46217
+ * gcc.dg/pr46217.c: New testcase.
+
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/dotsyntax-1.m: New.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int foo(int a)
+{
+ int t;
+ *(volatile int *)&t = a;
+}
+
+/* { dg-final { scan-tree-dump "={v}" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
if (DECL_P (decl)
&& (!integer_zerop (TREE_OPERAND (base, 1))
|| (DECL_SIZE (decl)
- != TYPE_SIZE (TREE_TYPE (base)))))
+ != TYPE_SIZE (TREE_TYPE (base)))
+ || TREE_THIS_VOLATILE (decl) != TREE_THIS_VOLATILE (base)))
return decl;
}
if (DECL_P (decl)
&& (!integer_zerop (TREE_OPERAND (lhs, 1))
|| (DECL_SIZE (decl)
- != TYPE_SIZE (TREE_TYPE (orig_lhs)))))
+ != TYPE_SIZE (TREE_TYPE (orig_lhs)))
+ || (TREE_THIS_VOLATILE (lhs)
+ != TREE_THIS_VOLATILE (decl))))
bitmap_set_bit (not_reg_needs, DECL_UID (decl));
}
}
if (DECL_P (decl)
&& (!integer_zerop (TREE_OPERAND (lhs, 1))
|| (TYPE_MAIN_VARIANT (TREE_TYPE (decl))
- != TYPE_MAIN_VARIANT (TREE_TYPE (orig_lhs)))))
+ != TYPE_MAIN_VARIANT (TREE_TYPE (orig_lhs)))
+ || (TREE_THIS_VOLATILE (lhs)
+ != TREE_THIS_VOLATILE (decl))))
bitmap_set_bit (not_reg_needs, DECL_UID (decl));
}
}