http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723

--- Comment #7 from petschy at gmail dot com ---
Is it a plausible assumption that if a function is not marked as 'noreturn' and
the loop doesn't change the program's state then the loop could be optimized
away?

Cases:
- the loop terminates, but the state is not changed, NOP
- the loop does not terminate (in this case a cycle of the Node's), but the
function should return (no noreturn attr), so this is probably a bug in the prg

I can't think of any cases right now for the second point where that would be
the desired behaviour of the program, instead of a bug. Please comment on this.

Reply via email to