public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization
@ 2004-06-29 15:37 olivier dot fourdan at regis-dgac dot net
  2004-06-29 15:41 ` [Bug c++/16273] " olivier dot fourdan at regis-dgac dot net
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: olivier dot fourdan at regis-dgac dot net @ 2004-06-29 15:37 UTC (permalink / raw)
  To: gcc-bugs

The (preprocessed) code attached produces various effects with GCC.

* gcc-3.0.4 (causes an ICE in GCC, "Internal compiler error in
build_secondary_vtable, at cp/class.c:865")
* gcc-3.3 (Virtual Memory exhausted)
* gcc-3.3.4 (Virtual Memory exhausted)
* gcc-3.4.0 (Virtual Memory exhausted)

The same code was compiling with GCC 2.95 using about 150Mb of RAM.

The attached preprocessed files is generated with gcc-3.3.4 on Solaris 8 but the
same problem occurs with other GCC version on Linux.

Current Host: SunOS solaris8 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-5_10

System Configuration:  Sun Microsystems  sun4u
Memory size: 256 Megabytes

Reading specs from /opt/gcc-3.3.4/lib/gcc-lib/sparc-sun-solaris2.8/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/opt/gcc-3.3.4
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-languages=c,c++
--enable-threads=posix --enable-static
Thread model: posix
gcc version 3.3.4
 /opt/gcc-3.3.4/lib/gcc-lib/sparc-sun-solaris2.8/3.3.4/cc1plus -E -D__GNUG__=3
-quiet -v -I/opt/X11R6/include
-I/netma/dnetma/_solaris/include/motif1.2.2/include
-I/local/tmp/rantanplan/dll/src -I/local/tmp/rantanplan/dll/include
-I/local/tmp/rantanplan/dll/srcGene -I/local/tmp/rantanplan/dll/includeGene
-D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=4 -Dsparc -D__sparc__
-D__sparc -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc -Dsparc -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -DGUI_INTERFACE -DXTI_COMMUNICATOR
-DIMPLEMENT_DLL_INTERFACE -DDOMAIN_NAME=netma
/local/tmp/rantanplan/dll/srcGene/corba_transaction_cluster_iCB_Dll.cc
-Wno-deprecated -fpermissive -fpic -fPIC -fno-external-templates -fno-inline
-fno-default-inline -ftemplate-depth-99 corba_transaction_cluster_iCB_Dll.ii
cc1plus: warning: switch "-fno-external-templates" is deprecated, please see 
   documentation for details
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/opt/gcc-3.3.4/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/X11R6/include
 /netma/dnetma/_solaris/include/motif1.2.2/include
 /local/tmp/rantanplan/dll/src
 /local/tmp/rantanplan/dll/include
 /local/tmp/rantanplan/dll/srcGene
 /local/tmp/rantanplan/dll/includeGene
 /opt/gcc-3.3.4/include/c++/3.3.4
 /opt/gcc-3.3.4/include/c++/3.3.4/sparc-sun-solaris2.8
 /opt/gcc-3.3.4/include/c++/3.3.4/backward
 /opt/gcc-3.3.4/include
 /opt/gcc-3.3.4/lib/gcc-lib/sparc-sun-solaris2.8/3.3.4/include
 /usr/include
End of search list.
 /opt/gcc-3.3.4/lib/gcc-lib/sparc-sun-solaris2.8/3.3.4/cc1plus -fpreprocessed
corba_transaction_cluster_iCB_Dll.ii -quiet -dumpbase
corba_transaction_cluster_iCB_Dll.cc -auxbase-strip
bin/corba_transaction_cluster_iCB_Dll.o -g -Wno-deprecated -version -fpermissive
-fpic -fPIC -fno-external-templates -fno-inline -fno-default-inline
-ftemplate-depth-99 -o corba_transaction_cluster_iCB_Dll.s
cc1plus: warning: switch "-fno-external-templates" is deprecated, please see 
   documentation for details
GNU C++ version 3.3.4 (sparc-sun-solaris2.8)
        compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32768

-- 
           Summary: Virtual memory exhausted in C++ even w/out any
                    optimization
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olivier dot fourdan at regis-dgac dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
@ 2004-06-29 15:41 ` olivier dot fourdan at regis-dgac dot net
  2004-06-29 16:16 ` pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: olivier dot fourdan at regis-dgac dot net @ 2004-06-29 15:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From olivier dot fourdan at regis-dgac dot net  2004-06-29 15:37 -------
Created an attachment (id=6650)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6650&action=view)
Preprocessed file (gzip -9 compressed)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
  2004-06-29 15:41 ` [Bug c++/16273] " olivier dot fourdan at regis-dgac dot net
@ 2004-06-29 16:16 ` pinskia at gcc dot gnu dot org
  2004-06-29 16:50 ` reichelt at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-29 16:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |memory-hog


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
  2004-06-29 15:41 ` [Bug c++/16273] " olivier dot fourdan at regis-dgac dot net
  2004-06-29 16:16 ` pinskia at gcc dot gnu dot org
@ 2004-06-29 16:50 ` reichelt at gcc dot gnu dot org
  2004-06-29 17:04 ` ebotcazou at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-29 16:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-06-29 16:45 -------
I tried 3.3.4 on i686-pc-linux-gnu. It used about 1 GB of memory before
I killed it.
With 3.4.0 I got some errors first, but the compiler kept doing its
job and the memory usage went up to 2 GB within seconds before I also
killed it.

To me this looks more like an infinite loop instead of a memory-hog.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (2 preceding siblings ...)
  2004-06-29 16:50 ` reichelt at gcc dot gnu dot org
@ 2004-06-29 17:04 ` ebotcazou at gcc dot gnu dot org
  2004-06-29 21:57 ` giovannibajo at libero dot it
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-06-29 17:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (3 preceding siblings ...)
  2004-06-29 17:04 ` ebotcazou at gcc dot gnu dot org
@ 2004-06-29 21:57 ` giovannibajo at libero dot it
  2004-06-30 12:25 ` giovannibajo at libero dot it
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-29 21:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-06-29 21:49 -------
Created an attachment (id=6657)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6657&action=view)
Unincluded, slightly reduced testcase

I am attacching an unincluded testcase which I have reduced a little, but still
way to go. If someone wants to get on reducing this, be my guest, I don't have
more time right now.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (4 preceding siblings ...)
  2004-06-29 21:57 ` giovannibajo at libero dot it
@ 2004-06-30 12:25 ` giovannibajo at libero dot it
  2004-06-30 13:48 ` reichelt at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-30 12:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-06-30 12:19 -------
Created an attachment (id=6663)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6663&action=view)
More reduction

More reduction, still way to go.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #6657 is|0                           |1
           obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (5 preceding siblings ...)
  2004-06-30 12:25 ` giovannibajo at libero dot it
@ 2004-06-30 13:48 ` reichelt at gcc dot gnu dot org
  2004-06-30 13:53 ` [Bug c++/16273] [3.3/3.4/3.5 regression] " reichelt at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-30 13:48 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Virtual memory exhausted in C++ even w/out any optimization
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (6 preceding siblings ...)
  2004-06-30 13:48 ` reichelt at gcc dot gnu dot org
@ 2004-06-30 13:53 ` reichelt at gcc dot gnu dot org
  2004-06-30 14:05 ` [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions reichelt at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-30 13:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-06-30 13:51 -------
This is a regression.
I removed the hardware triples, since this can be reproduced on
i686-pc-linux-gnu as well.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|sparc-sun-solaris2.8        |
   GCC host triplet|sparc-sun-solaris2.8        |
 GCC target triplet|sparc-sun-solaris2.8        |
            Summary|Virtual memory exhausted in |[3.3/3.4/3.5 regression]
                   |C++ even w/out any          |Virtual memory exhausted in
                   |optimization                |C++ even w/out any
                   |                            |optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (7 preceding siblings ...)
  2004-06-30 13:53 ` [Bug c++/16273] [3.3/3.4/3.5 regression] " reichelt at gcc dot gnu dot org
@ 2004-06-30 14:05 ` reichelt at gcc dot gnu dot org
  2004-07-03  1:23 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-30 14:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
            Summary|[3.3/3.4/3.5 regression]    |[3.3/3.4/3.5 regression]
                   |Virtual memory exhausted in |Memory exhausted when using
                   |C++ even w/out any          |nested classes and virtual
                   |optimization                |functions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (8 preceding siblings ...)
  2004-06-30 14:05 ` [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions reichelt at gcc dot gnu dot org
@ 2004-07-03  1:23 ` pinskia at gcc dot gnu dot org
  2004-07-03  2:39 ` giovannibajo at libero dot it
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-03  1:23 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (9 preceding siblings ...)
  2004-07-03  1:23 ` pinskia at gcc dot gnu dot org
@ 2004-07-03  2:39 ` giovannibajo at libero dot it
  2004-07-03  2:41 ` giovannibajo at libero dot it
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: giovannibajo at libero dot it @ 2004-07-03  2:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6664|Smaller example             |Smaller example (only 1000
        description|                            |lines of code)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (10 preceding siblings ...)
  2004-07-03  2:39 ` giovannibajo at libero dot it
@ 2004-07-03  2:41 ` giovannibajo at libero dot it
  2004-08-12  6:29 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: giovannibajo at libero dot it @ 2004-07-03  2:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-07-03 02:41 -------
Now reduced so we can finally confirm this (thanks Volker)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.0.4 3.3.4 3.4.0 3.5.0
      Known to work|                            |2.95.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-03 02:41:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (11 preceding siblings ...)
  2004-07-03  2:41 ` giovannibajo at libero dot it
@ 2004-08-12  6:29 ` mmitchel at gcc dot gnu dot org
  2004-08-12 17:58 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-12  6:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-12 06:29 -------
Working on a (possibly partial) fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (12 preceding siblings ...)
  2004-08-12  6:29 ` mmitchel at gcc dot gnu dot org
@ 2004-08-12 17:58 ` cvs-commit at gcc dot gnu dot org
  2004-08-12 18:05 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-12 17:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-12 17:58 -------
Subject: Bug 16273

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-08-12 17:58:25

Modified files:
	gcc/cp         : ChangeLog class.c 

Log message:
	PR c++/16273
	* class.c (count_depth_data): New type.
	(dfs_depth_post): New function.
	(dfs_depth_q): Likewise.
	(find_final_overrider_data_s): Change type of vpath.
	Add vpath_list.
	(dfs_find_final_overrider_1): New function.
	(dfs_find_final_overrider): Use it.
	(dfs_find_final_overrider_q): Adjust use of vpath.
	(dfs_find_final_overrider_post): Likewise.
	(find_final_overrider): Use dfs_depth.  Allocate and deallocate
	vpath_list.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4273&r2=1.4274
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.650&r2=1.651



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (13 preceding siblings ...)
  2004-08-12 17:58 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-12 18:05 ` cvs-commit at gcc dot gnu dot org
  2004-08-12 18:20 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-12 18:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-12 18:05 -------
Subject: Bug 16273

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-08-12 18:04:55

Modified files:
	gcc/cp         : ChangeLog class.c 

Log message:
	PR c++/16273
	* class.c (count_depth_data): New type.
	(dfs_depth_post): New function.
	(dfs_depth_q): Likewise.
	(find_final_overrider_data_s): Change type of vpath.
	Add vpath_list.
	(dfs_find_final_overrider_1): New function.
	(dfs_find_final_overrider): Use it.
	(dfs_find_final_overrider_q): Adjust use of vpath.
	(dfs_find_final_overrider_post): Likewise.
	(find_final_overrider): Use dfs_depth.  Allocate and deallocate
	vpath_list.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.145&r2=1.3892.2.146
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.595.4.8&r2=1.595.4.9



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (14 preceding siblings ...)
  2004-08-12 18:05 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-12 18:20 ` mmitchel at gcc dot gnu dot org
  2004-08-13 10:06 ` reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-12 18:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-12 18:20 -------
Fixed in GCC 3.4.2.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (15 preceding siblings ...)
  2004-08-12 18:20 ` mmitchel at gcc dot gnu dot org
@ 2004-08-13 10:06 ` reichelt at gcc dot gnu dot org
  2004-08-13 10:09 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-13 10:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-13 10:05 -------
For the record: With the example from comment #5 I now get:

3.4 branch:   50MB   6.5s
head:         40MB   5.2s

Compiling the original example with 3.4 branch on i686-pc-linux-gnu
gives a lot of error messages. But the compiler seems to keep doing
its job while the memory usage is staying below 130 MB.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (16 preceding siblings ...)
  2004-08-13 10:06 ` reichelt at gcc dot gnu dot org
@ 2004-08-13 10:09 ` reichelt at gcc dot gnu dot org
  2004-08-19 12:43 ` reichelt at gcc dot gnu dot org
  2004-12-08 10:12 ` [Bug c++/16273] [3.3/3.4/4.0 " david at starks-browning dot com
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-13 10:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-13 10:09 -------
Oops, sorry. The 130 MB is for mainline. With the 3.4 branch the memory usage
goes up to 190 MB.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (17 preceding siblings ...)
  2004-08-13 10:09 ` reichelt at gcc dot gnu dot org
@ 2004-08-19 12:43 ` reichelt at gcc dot gnu dot org
  2004-12-08 10:12 ` [Bug c++/16273] [3.3/3.4/4.0 " david at starks-browning dot com
  19 siblings, 0 replies; 21+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-19 12:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-19 12:43 -------
With minor corrections I could compile the unincluded testcase
with basically the same memory usage as in comment #13:
130 MB for mainline, 190 MB for 3.4 branch.
I even managed to compile it with -O2. That just added another 8MB.

With 2.95.3 memory usage peeks at about 95 MB (-O and -O2).
I think we can live with the 50% increase for such complex code.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug c++/16273] [3.3/3.4/4.0 regression] Memory exhausted when using nested classes and virtual functions
  2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
                   ` (18 preceding siblings ...)
  2004-08-19 12:43 ` reichelt at gcc dot gnu dot org
@ 2004-12-08 10:12 ` david at starks-browning dot com
  19 siblings, 0 replies; 21+ messages in thread
From: david at starks-browning dot com @ 2004-12-08 10:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From david at starks-browning dot com  2004-12-08 10:11 -------
What about 3.3?  Can it also be fixed there?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at starks-browning dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16273


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-12-08 10:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-29 15:37 [Bug c++/16273] New: Virtual memory exhausted in C++ even w/out any optimization olivier dot fourdan at regis-dgac dot net
2004-06-29 15:41 ` [Bug c++/16273] " olivier dot fourdan at regis-dgac dot net
2004-06-29 16:16 ` pinskia at gcc dot gnu dot org
2004-06-29 16:50 ` reichelt at gcc dot gnu dot org
2004-06-29 17:04 ` ebotcazou at gcc dot gnu dot org
2004-06-29 21:57 ` giovannibajo at libero dot it
2004-06-30 12:25 ` giovannibajo at libero dot it
2004-06-30 13:48 ` reichelt at gcc dot gnu dot org
2004-06-30 13:53 ` [Bug c++/16273] [3.3/3.4/3.5 regression] " reichelt at gcc dot gnu dot org
2004-06-30 14:05 ` [Bug c++/16273] [3.3/3.4/3.5 regression] Memory exhausted when using nested classes and virtual functions reichelt at gcc dot gnu dot org
2004-07-03  1:23 ` pinskia at gcc dot gnu dot org
2004-07-03  2:39 ` giovannibajo at libero dot it
2004-07-03  2:41 ` giovannibajo at libero dot it
2004-08-12  6:29 ` mmitchel at gcc dot gnu dot org
2004-08-12 17:58 ` cvs-commit at gcc dot gnu dot org
2004-08-12 18:05 ` cvs-commit at gcc dot gnu dot org
2004-08-12 18:20 ` mmitchel at gcc dot gnu dot org
2004-08-13 10:06 ` reichelt at gcc dot gnu dot org
2004-08-13 10:09 ` reichelt at gcc dot gnu dot org
2004-08-19 12:43 ` reichelt at gcc dot gnu dot org
2004-12-08 10:12 ` [Bug c++/16273] [3.3/3.4/4.0 " david at starks-browning dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).