PR c/70852
* c-common.c (warn_for_memset): Check domain before accessing it.
* gcc.dg/pr70852.c: New test.
From-SVN: r235638
+2016-04-29 Marek Polacek <polacek@redhat.com>
+
+ PR c/70852
+ * c-common.c (warn_for_memset): Check domain before accessing it.
+
2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR/69089
tree elt_type = TREE_TYPE (type);
tree domain = TYPE_DOMAIN (type);
if (!integer_onep (TYPE_SIZE_UNIT (elt_type))
+ && domain != NULL_TREE
&& TYPE_MAXVAL (domain)
&& TYPE_MINVAL (domain)
&& integer_zerop (TYPE_MINVAL (domain))
PR sanitizer/70342
* g++.dg/ubsan/null-7.C: New test.
+ PR c/70852
+ * gcc.dg/pr70852.c: New test.
+
2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR/69089
--- /dev/null
+/* PR c/70852 */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+extern void *memset (void *, int, __SIZE_TYPE__);
+extern int A[];
+void
+fn1 (void)
+{
+ memset (A, 0, 1);
+}