[Bug tree-optimization/86741] [9 Regression] ICE in vrp_prop::check_mem_ref building glibc for i686-gnu
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 31 09:32:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86741
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |9.0
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #3)
> 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;
Please use _positive_ tests!
if (!(...))
return;
so you clearly identify what you handle, not trying to enumerate the opposite.
More information about the Gcc-bugs
mailing list