This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/20216] [4.0 Regression] Simple loop runs out of stack at -O1
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2005 16:22:42 -0000
- Subject: [Bug tree-optimization/20216] [4.0 Regression] Simple loop runs out of stack at -O1
- References: <20050225212929.20216.fjahanian@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-01 16:22 -------
Subject: Bug 20216
CVSROOT: /cvs/gcc
Module name: gcc
Branch: apple-ppc-branch
Changes by: fjahanian@gcc.gnu.org 2005-03-01 16:21:44
Modified files:
gcc : tree-chrec.c
Added files:
gcc/testsuite/gcc.dg: pr20216.c
Log message:
Radar 4022005
PR tree-optimization/20216
* tree-chrec.c (tree_fold_factorial): Delete.
(tree_fold_binomial): Change argument list to take a return type
and change the type of K to unsigned int. Rewrite to avoid explicit
evaluation of factorials, and (recursively) calling fold to perform
compile-time arithmetic. Return NULL on (internal) overflow.
(chrec_evaluate): Change type of K to an unsigned int. Avoid
calling tree_fold_binomial unnecessarily. Return chrec_dont_know
if any intermediate calculation overflows.
(chrec_apply): Update call to chrec_evaluate.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr20216.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-chrec.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.9&r2=1.1.4.10
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20216