[Bug tree-optimization/57723] Missed optimization: recursion around empty function
petschy at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 27 08:52:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list