--- Comment #19 from zadeck at naturalbridge dot com 2008-01-11 13:09
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
ghazi at gcc dot gnu dot org wrote:
--- Comment #18 from ghazi at gcc dot gnu dot org 2008-01-11 03:57
--- Comment #18 from ghazi at gcc dot gnu dot org 2008-01-11 03:57 ---
Thanks Kenny, patch posted here:
http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00445.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33826
--- Comment #16 from ghazi at gcc dot gnu dot org 2008-01-09 18:42 ---
Ken - Your testcase (gcc.dg/pr33826.c) fails on i686 with -fpic/-fpic. If I
make the definitions static, it doesn't seem to help. Real bug, or skip with
pic?
--- Comment #17 from zadeck at naturalbridge dot com 2008-01-09 20:49
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
ghazi at gcc dot gnu dot org wrote:
--- Comment #16 from ghazi at gcc dot gnu dot org 2008-01-09 18:42
--- Comment #12 from richard dot guenther at gmail dot com 2007-11-08
09:08 ---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates wrong code for infinitely
recursive functions
On 11/7/07, Kenneth Zadeck [EMAIL PROTECTED] wrote:
This patch keeps recursive functions from being
--- Comment #15 from zadeck at naturalbridge dot com 2007-11-08 16:49
---
fixed
--
zadeck at naturalbridge dot com changed:
What|Removed |Added
Status|NEW
--- Comment #14 from zadeck at naturalbridge dot com 2007-11-08 16:48
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
Richard Guenther wrote:
On 11/7/07, Kenneth Zadeck [EMAIL PROTECTED] wrote:
This patch keeps recursive
--- Comment #13 from zadeck at gcc dot gnu dot org 2007-11-08 16:46 ---
Subject: Bug 33826
Author: zadeck
Date: Thu Nov 8 16:45:53 2007
New Revision: 130006
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=130006
Log:
2007-11-07 Kenneth Zadeck [EMAIL PROTECTED]
PR
--- Comment #10 from zadeck at naturalbridge dot com 2007-11-07 18:44
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
This patch keeps recursive functions from being marked as pure or const.
Full testing in progress on x86-64.
--- Comment #11 from zadeck at naturalbridge dot com 2007-11-08 01:23
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
zadeck at naturalbridge dot com wrote:
--- Comment #10 from zadeck at naturalbridge dot com 2007-11-07
--- Comment #5 from sam at rfc1149 dot net 2007-11-06 18:50 ---
Eric: do you mean that tail recursive calls are not allowed with -fstack-check?
With the current trunk, the code is ok with -O3 (tail-recursive call) and still
buggy with -O (rep ret on x86). This is even stranger :)
--
--- Comment #6 from ebotcazou at gcc dot gnu dot org 2007-11-06 19:04
---
Eric: do you mean that tail recursive calls are not allowed with
-fstack-check?
No, they are allowed. Optimizing the Ada testcase into an infinite loop is OK
if you don't consume the stack.
--
--- Comment #8 from ebotcazou at gcc dot gnu dot org 2007-11-06 21:33
---
I just talked to mark mitchell who was wearing his official language
lawyer hat at the time. He said i had to fix it. i will submit a patch
in the next day or so.
Thanks in advance.
--
--- Comment #7 from zadeck at naturalbridge dot com 2007-11-06 21:21
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
ebotcazou at gcc dot gnu dot org wrote:
--- Comment #6 from ebotcazou at gcc dot gnu dot org 2007-11-06
--- Comment #9 from zadeck at naturalbridge dot com 2007-11-06 21:52
---
Subject: Re: [4.1/4.2/4.3 Regression] GCC generates
wrong code for infinitely recursive functions
ebotcazou at gcc dot gnu dot org wrote:
--- Comment #8 from ebotcazou at gcc dot gnu dot org 2007-11-06
--- 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
--- 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
--- Comment #4 from ebotcazou at gcc dot gnu dot org 2007-11-05 23:06
---
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.
There is already an
--
mmitchel at gcc dot gnu dot org changed:
What|Removed |Added
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33826
--- Comment #1 from rguenth at gcc dot gnu dot org 2007-10-20 10:03 ---
foo is analyzed to be const by ipa-pure-const and so the self-recursive call
is DCEd. Now one could argue that foo indeed _is_ const, for example
unsigned foo(unsigned i)
{
if (i == 1)
return 1;
return
20 matches
Mail list logo