https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89303
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Those DCE or DSE removals of the store look weird. In the alias info we have:
# PT = null { D.5120 } (escaped, escaped heap)
# ALIGN = 8, MISALIGN = 0
# USE = nonlocal null { D.4247 D.5109 D.5120 D.5121 } (nonlocal, escaped,
escaped heap, interposable)
# CLB = nonlocal null { D.4247 D.5109 D.5120 D.5121 } (nonlocal, escaped,
escaped heap, interposable)
_24 = malloc (40);
...
# PT = null { D.5109 D.5120 } (escaped)
_16 = &MEM[(struct __aligned_buffer *)_24 + 16B]._M_storage;
...
<bb 18> [local count: 488552530]:
MEM[(struct __weak_count *)_16 + 8B clique 10 base 0]._M_pi = _24;
<bb 19> [local count: 1073741824]:
return;
When the pointer is escaped, how can it DCE a store to it?