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: 5 May 2010 16:32:44 -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 #15 from jason at gcc dot gnu dot org 2010-05-05 16:32 -------
Subject: Bug 43787
Author: jason
Date: Wed May 5 16:32:20 2010
New Revision: 159072
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159072
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:
trunk/gcc/testsuite/g++.dg/opt/empty1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43787