This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for memory explosion with templates/inlines
- To: egcs-bugs at cygnus dot com
- Subject: Re: Patch for memory explosion with templates/inlines
- From: Corey Kosak <kosak at cs dot cmu dot edu>
- Date: Fri, 02 Jan 1998 03:56:45 -0500
- cc: mmitchell at usa dot net
Even after Mark Mitchell's 12/18 patch, there still appears to be a memory
explosion problem when using -O2 (note! even without -Wreturn-type), which
disappears when the inline declarations are #defined away.
% g++ -v
Reading specs from /usr2/aloco/lib/gcc-lib/alpha-dec-osf3.2/egcs-2.91.03/specs
gcc version egcs-2.91.03 971225 (gcc-2.8.0)
% limit datasize 200M
% g++ -c explosion.cc // compiles OK
% g++ -c -O explosion.cc // compiles OK
% g++ -c -O2 explosion.cc // bad
/usr/local/lib/bison.simple: In function `long int yyparse()':
/usr/local/lib/bison.simple:659: virtual memory exhausted
% g++ -c -O2 -Dinline= explosion.cc // disable inlines, now compiles OK
Unfortunately, I haven't been able to isolate a simple test case; the file
causing the above errors is at:
http://www.cs.cmu.edu/~kosak/stuff/explosion.cc