]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix thinko in latest change to setup_one_parameter
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 25 May 2021 14:51:05 +0000 (16:51 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 25 May 2021 14:51:57 +0000 (16:51 +0200)
gcc/
* tree-inline.c (setup_one_parameter): Fix thinko in new condition.

gcc/tree-inline.c

index 8f945b88c12fd4e9745f2671ddc0ad753fee7845..1d13e7f5acaf08e134f31c6e17d70c459d0b46ff 100644 (file)
@@ -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