+2012-09-06 Andrew Pinski <apinski@cavium.com>
+
+ PR tree-opt/54494
+ * tree-inline.c (remap_gimple_op_r): Copy TREE_SIDE_EFFECTS also.
+
2012-09-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/54455
+2012-09-06 Andrew Pinski <apinski@cavium.com>
+
+ PR tree-opt/54494
+ * gcc.dg/tree-ssa/strlen-1.c: New testcase.
+
2012-09-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/54455
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+extern const unsigned long base;
+static inline void wreg(unsigned char val, unsigned long addr) __attribute__((always_inline));
+static inline void wreg(unsigned char val, unsigned long addr)
+{
+ *((volatile unsigned char *) (__SIZE_TYPE__) (base + addr)) = val;
+}
+void wreg_twice(void)
+{
+ wreg(0, 42);
+ wreg(0, 42);
+}
+
+/* We should not remove the second null character store to (base+42) address. */
+/* { dg-final { scan-tree-dump-times " ={v} 0;" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
ptr, TREE_OPERAND (*tp, 1));
TREE_THIS_NOTRAP (*tp) = TREE_THIS_NOTRAP (old);
TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old);
+ TREE_SIDE_EFFECTS (*tp) = TREE_SIDE_EFFECTS (old);
TREE_NO_WARNING (*tp) = TREE_NO_WARNING (old);
*walk_subtrees = 0;
return NULL;