From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22958 invoked by alias); 30 Jun 2004 13:48:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22942 invoked by uid 48); 30 Jun 2004 13:48:27 -0000 Date: Wed, 30 Jun 2004 13:48:00 -0000 Message-ID: <20040630134827.22941.qmail@sourceware.org> From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040629153633.16273.olivier.fourdan@regis-dgac.net> References: <20040629153633.16273.olivier.fourdan@regis-dgac.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg03924.txt.bz2 List-Id: ------- Additional Comments From reichelt at gcc dot gnu dot org 2004-06-30 13:48 ------- Created an attachment (id=6664) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6664&action=view) Smaller example After some reduction I came up with the attached example. And now I'm convinced that this is really just a memory-hog. Just have a look at the memory usage and compilation times: gcc 2.95.3: 15MB 2.87s gcc 3.0: segfault gcc 3.0.4: ICE in build_secondary_vtable, at cp/class.c gcc 3.1: 82MB 11.17s gcc 3.2.3: 82MB 11.22s gcc 3.3: 334MB 72.07s gcc 3.3.4: 334MB 70.58s gcc 3.4.0: 554MB 10.52s 3.4 branch: 554MB 10.52s head: 654MB 10.16s lno branch: 655MB 10.45s This is an increase in memory usage by a factor of 44 sinc gcc 2.95.3 !!!! It's no surprise that this goes beyond 2GB with a larger example. :-( Adding "-fsyntax-only" on the command-line doesn't help. Btw, the reduced example is all about nested classes, inheritance and virtual functions. It compiles without errors since gcc 2.95.3 (with the exception that the 3.0 branch crashes). I got rid of all static member funtions and most (if not all) function definitions (as opposed to declarations). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273