[Bug tree-optimization/92638] gcc unable to remove empty loop after loop body is removed after malloc/free pair was removed

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 25 10:22:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92638

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's not really "iteration" that is missing but the free () stmt is marked
as necessary and only later "elided" but dataflow makes the loop necessary
because of that.  We may eventually get away with not considering free
as needed (it doesn't have any output), but propagation will never make
it so so we'd have to fixup manually somehow.

One "fix" would be to turn one of the earlier DCE passes into CD-DCE ones
(I'd really like to unify the passes and make CD vs non-CD a pass
parameter but that requires extensive testsuite adjustments...)


More information about the Gcc-bugs mailing list