https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79690
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- But an extra assert like the following triggers during bootstrap so we can't really avoid the casting (in all cases). Index: gcc/tree-ssa-address.c =================================================================== --- gcc/tree-ssa-address.c (revision 245681) +++ gcc/tree-ssa-address.c (working copy) @@ -708,6 +702,9 @@ create_mem_ref (gimple_stmt_iterator *gs tree mem_ref, tmp; struct mem_address parts; + if (base_hint) + gcc_assert (POINTER_TYPE_P (TREE_TYPE (base_hint))); + addr_to_parts (type, addr, iv_cand, base_hint, &parts, speed); gimplify_mem_ref_parts (gsi, &parts); mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true); OTOH it looks harmless for a few cases I tried (the base_hint won't match in the search for it). Testing w/o that assert.