This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12765] [3.3.2 regression] 2GB mem not enough for sucessful compile
- From: "debian-gcc at lists dot debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2003 09:39:22 -0000
- Subject: [Bug c++/12765] [3.3.2 regression] 2GB mem not enough for sucessful compile
- References: <20031024171131.12765.debian-gcc@lists.debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12765
debian-gcc at lists dot debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
------- Additional Comments From debian-gcc at lists dot debian dot org 2003-10-25 09:39 -------
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;