[Bug rtl-optimization/66370] compiler crashes when compiling a function with a huge number of arguments

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 2 09:03:00 GMT 2015


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
          Component|c                           |rtl-optimization

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Is the size of the stack limited on mingw-w64?  If so, try unlimiting it.

We do have gcc.c-torture/compile/limits-fnargs.c in the testsuite which
uses 100000 parameters (albeit it just declares such a function and
calls it with constant arguments).

It works fine here (x86_64-linux) with 28040 arguments and optimization,
but it takes quite some time to compile (the scaling doesn't seem linear
but quadratic at least... :/).

time-report from GCC 5, 28040 arguments and -O1:

Execution times (seconds)
 phase opt and generate  :  97.58 (100%) usr   0.15 (68%) sys  97.73 (100%)
wall  100442 kB (90%) ggc
 forward prop            :  29.33 (30%) usr   0.03 (14%) sys  29.36 (30%) wall 
  3942 kB ( 4%) ggc
 combiner                :  32.60 (33%) usr   0.03 (14%) sys  32.63 (33%) wall 
 14237 kB (13%) ggc
 integrated RA           :  33.77 (35%) usr   0.05 (23%) sys  33.79 (35%) wall 
 26565 kB (24%) ggc
 TOTAL                 :  97.66             0.22            97.88            
111079 kB

I have a stack limit of 8MB configured.



More information about the Gcc-bugs mailing list