+2019-07-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91211
+ * tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Fix
+ memset encoding size.
+
2019-07-19 Uroš Bizjak <ubizjak@gmail.com>
PR target/91204
2019-07-19 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/91211
+ * gcc.dg/torture/pr91211.c: New testcase.
+
+2019-07-19 Richard Biener <rguenther@suse.de>
+
PR tree-optimization/91200
* gcc.dg/torture/pr91200.c: New testcase.
--- /dev/null
+/* { dg-do run } */
+
+typedef __UINT32_TYPE__ u32;
+
+int
+main (void)
+{
+ u32 b = 0x027C5902;
+ u32 a = 0;
+ __builtin_memset (1 + (char *) &b, 0, 2);
+ __builtin_memcpy (&a, 2 + (char *) &b, 2);
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ if (a != 0x00000200)
+#else
+ if (a != 0x00020000)
+#endif
+ __builtin_abort();
+ return 0;
+}
if (TREE_CODE (pd.rhs) == CONSTRUCTOR)
/* Empty CONSTRUCTOR. */
memset (buffer + MAX (0, pd.offset),
- 0, MIN ((HOST_WIDE_INT)sizeof (buffer), pd.size));
+ 0, MIN ((HOST_WIDE_INT)sizeof (buffer),
+ pd.size + MIN (0, pd.offset)));
else
{
unsigned pad = 0;