From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14284 invoked by alias); 14 Jan 2013 13:50:02 -0000 Received: (qmail 13091 invoked by uid 48); 14 Jan 2013 13:48:53 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/55792] [4.8 Regression] Bad memory access with profiledbootstrap and LTO Date: Mon, 14 Jan 2013 13:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01167.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55792 --- Comment #35 from Richard Biener 2013-01-14 13:48:47 UTC --- And the following may fix it at a single central place. Index: gcc/tree-inline.c =================================================================== --- gcc/tree-inline.c (revision 195144) +++ gcc/tree-inline.c (working copy) @@ -2563,11 +2563,11 @@ setup_one_parameter (copy_body_data *id, basic_block bb, tree *vars) { gimple init_stmt = NULL; - tree var; - tree rhs = value; + tree var, rhs; tree def = (gimple_in_ssa_p (cfun) ? ssa_default_def (id->src_cfun, p) : NULL); + rhs = value = unshare_expr_without_location (value); if (value && value != error_mark_node && !useless_type_conversion_p (TREE_TYPE (p), TREE_TYPE (value)))