+2014-11-18 Teresa Johnson <tejohnson@google.com>
+
+ Backport from mainline and gcc-4_9 branch.
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
+
+ PR tree-optimization/63841
+ * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
+
2014-11-16 Eric Botcazou <ebotcazou@adacore.com>
* doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
+2014-11-18 Teresa Johnson <tejohnson@google.com>
+
+ Backport from mainline and gcc-4_9 branch.
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
+
+ PR tree-optimization/63841
+ * g++.dg/tree-ssa/pr63841.C: New test.
+
2014-11-12 Jakub Jelinek <jakub@redhat.com>
PR ipa/63838
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include <string>
+
+std::string __attribute__ ((noinline)) comp_test_write() {
+ std::string data;
+
+ for (int i = 0; i < 2; ++i) {
+ char b = 1 >> (i * 8);
+ data.append(&b, 1);
+ }
+
+ return data;
+}
+
+std::string __attribute__ ((noinline)) comp_test_write_good() {
+ std::string data;
+
+ char b;
+ for (int i = 0; i < 2; ++i) {
+ b = 1 >> (i * 8);
+ data.append(&b, 1);
+ }
+
+ return data;
+}
+
+int main() {
+ std::string good = comp_test_write_good();
+ std::string bad = comp_test_write();
+
+ if (good != bad)
+ __builtin_abort ();
+}
break;
}
}
- else if (is_gimple_assign (stmt))
+ else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
{
tree lhs = gimple_assign_lhs (stmt);