https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119978
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |alias, missed-optimization --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- h.v = v_3(D); _12 = &MEM[(struct IntrusiveList *)this_2(D)].node; MEM[(struct ListNode &)&h].next = _12; _13 = MEM[(struct IntrusiveList *)this_2(D)].node.prev; _13->next = &h; MEM[(struct IntrusiveList *)this_2(D)].node.prev = &h; <--- this one MEM[(struct ListNode *)_4(D)].prev = _13; _9 = MEM[(struct ListNode &)&h].next; MEM[(struct ListNode *)_4(D)].next = _9; MEM[(struct ListNode &)&h].prev = 0B; MEM[(struct ListNode &)&h].next = 0B; It looks like there could be a case where that is still alive at the end of the function. There is a missed optimization here where GCC thinks this_2(D) and _4(D) could point to the same thing but it could not. Note _4(D) is the hidden "return pointer"