[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug tree-optimization/33826] [4.1/4.2/4.3 Regression] GCC generates wrong code for infinitely recursive functions




------- Comment #3 from zadeck at naturalbridge dot com  2007-11-05 22:16 -------
Subject: Re:  [4.1/4.2/4.3 Regression] GCC generates
 wrong code for infinitely recursive functions

steven at gcc dot gnu dot org wrote:
> ------- 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.
>
>
>   
I have never been happy with how the "edge" cases of programs that are
designed to do undefined behavior are used to define what is correct and
what is not correct for well defined programs. 

So i am unconvinced by steven's argument. 

If someone either can turn this into a program that gets the wrong
answer on a program that has a defined behavior with a language that gcc
supports, then i will take this bug seriously. 

Kenny


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



Reply to: