From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id 99EB53896C31; Tue, 25 May 2021 14:52:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99EB53896C31 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Eric Botcazou To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1042] Fix thinko in latest change to setup_one_parameter X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: 7a5e9a58fbe27d8b8f04cd18bc6e1dd736e3cd12 X-Git-Newrev: 1d3707a52d6b8a3054248b4291719150937db309 Message-Id: <20210525145204.99EB53896C31@sourceware.org> Date: Tue, 25 May 2021 14:52:04 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2021 14:52:04 -0000 https://gcc.gnu.org/g:1d3707a52d6b8a3054248b4291719150937db309 commit r12-1042-g1d3707a52d6b8a3054248b4291719150937db309 Author: Eric Botcazou Date: Tue May 25 16:51:05 2021 +0200 Fix thinko in latest change to setup_one_parameter gcc/ * tree-inline.c (setup_one_parameter): Fix thinko in new condition. Diff: --- gcc/tree-inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 8f945b88c12..1d13e7f5aca 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3446,7 +3446,7 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn, sure that it cannot be modified from another path in the callee. */ if ((is_gimple_min_invariant (value) || (DECL_P (value) && TREE_READONLY (value)) - || (auto_var_in_fn_p (value, id->src_fn) + || (auto_var_in_fn_p (value, id->dst_fn) && !TREE_ADDRESSABLE (value))) && useless_type_conversion_p (TREE_TYPE (p), TREE_TYPE (value)) /* We have to be very careful about ADDR_EXPR. Make sure