https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117291

--- Comment #10 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #8)
> See PR c++/49756.  It uses 64MB, not unlimited.
[bergner@ltcden2-lp1 ICE]$ ulimit -s 8192
[bergner@ltcden2-lp1 ICE]$ /opt/gcc-nightly/trunk/bin/gcc -S test.c
gcc: internal compiler error: Segmentation fault signal terminated program cc1
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
[bergner@ltcden2-lp1 ICE]$ ulimit -s 65536
[bergner@ltcden2-lp1 ICE]$ /opt/gcc-nightly/trunk/bin/gcc -S test.c
[bergner@ltcden2-lp1 ICE]$ 

So it SEGV's with 8M stack, but is ok with explicit 64M stack.  The automatic
stack limit code is guarded by:

void
stack_limit_increase (unsigned long pref ATTRIBUTE_UNUSED)
{
#if defined(HAVE_SETRLIMIT) && defined(HAVE_GETRLIMIT) \
    && defined(RLIMIT_STACK) && defined(RLIM_INFINITY)
...

I'll have to see why one or more of these are not set on Power.

Reply via email to