https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116556
--- Comment #2 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> --- The problem here is that the expression generated is: # t_1 = PHI <8(2), 4(3)> p_6 = buf2_4 + t_1; where tree-object-size then bails out because it can only handle (PTR or ADDR_EXPR) + INTEGER_CST, because of which it bails out. I've posted a patch.