[Bug tree-optimization/57723] Missed optimization: recursion around empty function
mikpe at it dot uu.se
gcc-bugzilla@gcc.gnu.org
Thu Jun 27 13:34:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723
--- Comment #9 from Mikael Pettersson <mikpe at it dot uu.se> ---
(In reply to Michael Matz from comment #8)
> (the
> argument being that an infinite loop is in itself a side-effect observable
> from
> outside).
Exactly.
> A function containing
> an infinite loop could be stopped from a different thread.
We have production code which does that, except the stopping (and redirection
to another context) is done from a separate monitor process via ptrace().
GCC "optimizing" away infinite loops is just plain wrong, at least for ordinary
systems programming languages.
More information about the Gcc-bugs
mailing list