From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32629 invoked by alias); 10 Jan 2005 17:04:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32605 invoked by uid 48); 10 Jan 2005 17:04:40 -0000 Date: Mon, 10 Jan 2005 17:04:00 -0000 Message-ID: <20050110170440.32604.qmail@sourceware.org> From: "fche at redhat dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050107223136.19319.bredelin@ucla.edu> References: <20050107223136.19319.bredelin@ucla.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libmudflap/19319] Mudflap produce many violations on simple, correct c++ program X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg01251.txt.bz2 List-Id: ------- Additional Comments From fche at redhat dot com 2005-01-10 17:04 ------- This patch appears to fix the problem: testing and getting approvals --- gimplify.c 1 Jan 2005 01:43:08 -0000 2.101 +++ gimplify.c 10 Jan 2005 17:03:54 -0000 @@ -2949,6 +2949,15 @@ gimplify_modify_expr (tree *expr_p, tree if (ret != GS_UNHANDLED) return ret; + /* Handle aggregate returns from function calls. We need to mark + the LHS addressable, since the expanded call will pass its + address as a hidden argument. */ + if (TREE_CODE (*from_p) == CALL_EXPR) + { + if (aggregate_value_p (*to_p, *from_p)) + lang_hooks.mark_addressable (*to_p); + } + /* If we've got a variable sized assignment between two lvalues (i.e. does not involve a call), then we can make things a bit more straightforward by converting the assignment to memcpy or memset. */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19319