https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79715
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- This works as expected on trunk and in GCC 7. I have a feeling this has actually worked since r233267. The test case in comment #0 uses -fdump-tree-printf-return-value instead of -fdump-tree-optimized to look at the assembly and the printf-return-value pass runs before the DSE pass that optimizes it. Resolving as fixed.