[Bug ipa/105728] dead store to static var not optimized out

2025-02-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105728 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug ipa/105728] dead store to static var not optimized out

2024-07-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105728 Andrew Pinski changed: What|Removed |Added CC||pinskia at gcc dot gnu.org Se

[Bug ipa/105728] dead store to static var not optimized out

2022-05-27 Thread felix-gcc at fefe dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105728 --- Comment #4 from felix-gcc at fefe dot de --- If you do have a printf that references debug_cnt, it wouldn't be removed, right? If you expect unreferenced variables to not be optimized out, you can always compile without optimizer. For local

[Bug ipa/105728] dead store to static var not optimized out

2022-05-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105728 --- Comment #3 from Richard Biener --- Btw, any such optimization would be prone to remove 'debug_cnt' in void foo() { static int debug_cnt = 0; debug_cnt++; .. stuff .. } because here nothing depends on debug_cnt. For some printf-style

[Bug ipa/105728] dead store to static var not optimized out

2022-05-26 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105728 Richard Biener changed: What|Removed |Added Component|c |ipa Last reconfirmed|