This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43787] [4.5/4.6 Regression] memory copy of empty class (sizeof is one)
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 May 2010 05:23:42 -0000
- Subject: [Bug c++/43787] [4.5/4.6 Regression] memory copy of empty class (sizeof is one)
- References: <bug-43787-17658@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from jason at gcc dot gnu dot org 2010-05-13 05:23 -------
Subject: Bug 43787
Author: jason
Date: Thu May 13 05:23:14 2010
New Revision: 159352
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159352
Log:
PR c++/43787
gcc:
* gimplify.c (gimplify_expr): Keep working if gimplify_modify_expr
returns GS_OK.
(gimplify_modify_expr_rhs): Return GS_OK if anything changed.
gcc/cp:
* cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
* call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
Added:
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/opt/empty1.C
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/cp/ChangeLog
branches/gcc-4_5-branch/gcc/cp/call.c
branches/gcc-4_5-branch/gcc/cp/cp-gimplify.c
branches/gcc-4_5-branch/gcc/gimplify.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43787