[Bug sanitizer/104718] Leak reported for elided static variable
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 28 13:37:24 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104718
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, you can use -fno-tree-dce to make it appear again even with current
trunk.
Though perhaps we can say that it is user's fault in that case.
After all, the testcase does leak memory, because it never deletes those
pointers, we just normally don't complain about it because the pointer is still
reachable in mut2. But if mut2 isn't actually used, it isn't live anywhere.
More information about the Gcc-bugs
mailing list