This is a regression from 3.3 CVS from 20031005, at least on i486-linux. The file attached compiles almost instantly with the CVS version, but just eats memory with the released version.
Created attachment 4987 [details] preprocessed source
Introduced by this patch: 2003-10-14 Jason Merrill <jason@redhat.com> PR c++/11878 * tree.c (build_target_expr_with_type): Call force_rvalue for classes with non-trivial copy ctors. =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v retrieving revision 1.307.2.4 retrieving revision 1.307.2.5 diff -u -r1.307.2.4 -r1.307.2.5 --- gcc/gcc/cp/tree.c 2003/10/02 12:00:48 1.307.2.4 +++ gcc/gcc/cp/tree.c 2003/10/14 20:45:39 1.307.2.5 @@ -357,6 +357,12 @@ if (TREE_CODE (init) == TARGET_EXPR) return init; + else if (CLASS_TYPE_P (type) && !TYPE_HAS_TRIVIAL_INIT_REF (type) + && TREE_CODE (init) != COND_EXPR) + /* We need to build up a copy constructor call. COND_EXPR is a special + case because we already have copies on the arms and we don't want + another one here. */ + return force_rvalue (init); slot = build (VAR_DECL, type); DECL_ARTIFICIAL (slot) = 1;
*** This bug has been marked as a duplicate of 12726 ***