https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94217
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- (In reply to Nicholas Krause from comment #1) > Hi Marin, > I've not sure if this is correct but it does not ICE with this fix: > tree off = fold_convert (ptr_type_node, op1); > - return build_fold_addr_expr_loc > - (loc, > + return build1_loc > + (loc, ADDR_EXPR, TREE_TYPE (op0), > fold_build2 (MEM_REF, > TREE_TYPE (TREE_TYPE (op0)), > unshare_expr (op0), off)); > > should actually be: > (EXPR_LOCATION(off), ADDR_EXPR, TREE_TYPE (op0), > fold_build2 (MEM_REF, > TREE_TYPE (TREE_TYPE (op0)), > unshare_expr (op0), off)); Huh? Why do you think that changing the location should fix the ICE? That's a completely random change that you never bothered to test, because it doesn't fix the crash.