This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 'stack overflow' message for Darwin; host hooks


Geoffrey Keating wrote:

I haven't investigated all the cases, but at least for one test case the cause was real recursion in walk_tree (thousands of levels deep).
Another such test case is (observed on 3.3 branch)

int bla(int x)
{
	return x + x + ... + x;
}

(with "..." denoting "lots of x's").


It definately eats more than linear space.

For more fun try x + y + x + y + ...


Segher



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]