This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33826] [4.1/4.2/4.3 Regression] GCC generates wrong code for infinitely recursive functions
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Nov 2007 21:38:14 -0000
- Subject: [Bug tree-optimization/33826] [4.1/4.2/4.3 Regression] GCC generates wrong code for infinitely recursive functions
- References: <bug-33826-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from steven at gcc dot gnu dot org 2007-11-05 21:38 -------
It seems to me that a recursive function can never be safely treated as
const/pure. In fact, any function in an SCC in the call graph could result in
an endless loop and is therefore not const/pure. I'm assuming here that hanging
in an infinite loop is a "side-effect", and I understand this is a debatable
assumption.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zadeck at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33826