Comments
Patch
===================================================================
@@ -607,7 +607,7 @@ gimplify_and_update_call_from_tree (gimp
unlink_stmt_vdef (stmt);
release_defs (stmt);
}
- gsi_remove (si_p, true);
+ gsi_replace (si_p, gimple_build_nop (), true);
return;
}
}
===================================================================
@@ -0,0 +1,14 @@
+// PR tree-optimization/55331
+// { dg-do compile }
+// { dg-options "-O2 -fno-tree-fre" }
+
+struct A {};
+
+void
+foo (A *p, bool x)
+{
+ A a;
+ char *e = (char *) (&a + 1);
+ if (x)
+ __builtin_memmove (p, &a, e - (char *) &a);
+}