+2018-08-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/86988
+ * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
+
2018-08-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/86945
+2018-08-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/86988
+ * g++.dg/pr86988.C: New testcase.
+
2018-08-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/86945
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2 -Warray-bounds" }
+
+struct R { int r; };
+void baz (char *, char *, char *, char *);
+
+void
+foo ()
+{
+ const R a = { 12 };
+ char b[1][a.r] = { { "12345678901" } };
+ char c[a.r] = { "12345678901" };
+ char d[1][a.r] = { { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '\0' } };
+ char e[a.r] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '\0' };
+ baz (b[0], c, d[0], e);
+}
tree reftype = TREE_TYPE (arg);
if (POINTER_TYPE_P (reftype)
|| !COMPLETE_TYPE_P (reftype)
+ || TREE_CODE (TYPE_SIZE_UNIT (reftype)) != INTEGER_CST
|| RECORD_OR_UNION_TYPE_P (reftype))
return;