//-------------------- class x { public: unsigned long mem[1024*1024*10]; x(); }; class y : public x { public: y(); }; //-------------------- The preceeding piece of code consumes a VERY large amount of memory to compile. "record_subobject_offset" in class.c is being called for EVERY item in x::mem Release: 3.1 Environment: RH 7.3 How-To-Repeat: compile the code fragment in the description
Fix: http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01223.html
State-Changed-From-To: open->analyzed State-Changed-Why: See http://gcc.gnu.org/ml/gcc/2002-10/msg00675.html
Responsible-Changed-From-To: unassigned->mmitchel Responsible-Changed-Why: I will be fixing this once the nice new book on computational geometry that I need shows up.
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed in GCC 3.2.
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/8218 Date: 21 Oct 2002 08:40:25 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2002-10-21 01:40:25 Modified files: gcc/cp : ChangeLog class.c cp-tree.h Log message: PR c++/8218 * cp-tree.h (lang_type_class): Add contains_empty_class_p. (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. (check_field_decls): Likewise. (layout_class_type): Likewise. (finish_struct_1): Initialize it. (walk_subobject_offsets): Use it to prune searches. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3015&r2=1.3016 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.480&r2=1.481 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.760&r2=1.761
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/8218 Date: 21 Oct 2002 09:29:14 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_2-branch Changes by: mmitchel@gcc.gnu.org 2002-10-21 02:29:13 Modified files: gcc/cp : ChangeLog class.c cp-tree.h Log message: PR c++/8218 * cp-tree.h (lang_type_class): Add contains_empty_class_p. (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. (check_field_decls): Likewise. (layout_class_type): Likewise. (finish_struct_1): Initialize it. (walk_subobject_offsets): Use it to prune searches. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.27&r2=1.2685.2.114.2.28 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.436.2.10.2.6&r2=1.436.2.10.2.7 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.681.2.12.2.5&r2=1.681.2.12.2.6