The new pointer_related_p() utility function added for -Wuse-after-free is documented to conservatively return false when it cannot determine relatedness but actually returns true. That has caused the false positive reported in PR 104069. In r12-6712 I've committed as obvious a fix for this mistake along with a test case.
https://gcc.gnu.org/g:2f714642e574c64e1c0e093cad3de6f8accb6ec7 Martin