https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86741

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
So I think this ought to fix it:

--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -5051,7 +5051,8 @@ vrp_prop::check_mem_ref (location_t location, tree ref,
bool ignore_off_by_one)
      to identify the member where the reference originated.  */
   tree reftype = TREE_TYPE (arg);
   if (POINTER_TYPE_P (reftype)
-      || RECORD_OR_UNION_TYPE_P (reftype))
+      || RECORD_OR_UNION_TYPE_P (reftype)
+      || VOID_TYPE_P (reftype))
     return;

   offset_int eltsize;

Reply via email to