This is the mail archive of the gcc-bugs@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]

Re: Patch for memory explosion with templates/inlines



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


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