https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70096
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Patrick Palka from comment #3) > The problem ultimately seems to be that the invariant DECL_MODE (x) == > TYPE_MODE (TREE_TYPE (fptr)) is violated during substitution due to a change > in the TREE_TYPE of fptr from OFFSET_TYPE to TYPE_PTRMEMFUNC_P. > > I haven't looked into why r229018 causes this regression. I suppose that > r229018 somehow exposed this latent bug. Before r229018, when PTRMEM_CSTs are eagerly expanded in digest_init, we directly initialize fptr: h.data = 42; fptr.__pfn = foo; fptr.__delta = 0; _5 = fptr.__pfn; _6 = fptr.__delta; _7 = (sizetype) _6; _8 = &h + _7; _5 (_8); After r229018, we initialize a temporary and then copy it to fptr: h.data = 42; fptr.0.__pfn = foo; fptr.0.__delta = 0; fptr = fptr.0; // This aggregate copy is the problem, its LHS has DImode and its RHS has TImode _6 = fptr.__pfn; _7 = fptr.__delta; _8 = (sizetype) _7; _9 = &h + _8; _6 (_9);