+2018-07-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/86363
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
+ memset argument refers to a non-variable address.
+
2018-07-02 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
+2018-07-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/86363
+ * gcc.dg/torture/pr86363.c: New testcase.
+
2018-07-02 Martin Liska <mliska@suse.cz>
* gcc.dg/completion-1.c: New test.
--- /dev/null
+/* { dg-do run } */
+/* { dg-additional-options "-w -Wno-psabi" } */
+
+typedef char U __attribute__ ((vector_size (16)));
+typedef unsigned V __attribute__ ((vector_size (16)));
+
+V g;
+
+V
+f (V v, U u)
+{
+ __builtin_memset (&u[v[0]], 0, 1);
+ g ^= u[0];
+ return g;
+}
+
+int
+main (void)
+{
+ V x = f ((V) { 5 }, (U) { 1 });
+
+ if (x[0] != 1 || x[1] != 1 || x[2] != 1 || x[3] != 1)
+ __builtin_abort ();
+ return 0;
+}
base2 = get_ref_base_and_extent (ref2, &offset2, &size2, &maxsize2,
&reverse);
if (!known_size_p (maxsize2)
+ || !known_eq (maxsize2, size2)
|| !operand_equal_p (base, base2, OEP_ADDRESS_OF))
return (void *)-1;
}