From: Jason Merrill Date: Sun, 12 Feb 2006 08:01:04 +0000 (-0500) Subject: re PR tree-optimization/24365 (statement makes a memory store with complex) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d327c160a08807deeab07d6b9af30115853eda1;p=gcc.git re PR tree-optimization/24365 (statement makes a memory store with complex) PR tree-opt/24365 * tree-inline.c (declare_return_variable): Just don't use the modify target if it's a gimple complex reg and the return slot isn't. From-SVN: r110888 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6bd762e41d..095c6d601c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-02-11 Jason Merrill + + PR tree-opt/24365 + * tree-inline.c (declare_return_variable): Just don't use the + modify target if it's a gimple complex reg and the return slot + isn't. + 2006-02-11 Kaveh R. Ghazi * doc/contrib.texi: Update my entry. diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 81682c82ec2..8d258ffd0c5 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1222,9 +1222,10 @@ declare_return_variable (copy_body_data *id, tree return_slot_addr, use_it = false; else if (is_global_var (base_m)) use_it = false; - else if (TREE_CODE (TREE_TYPE (base_m)) == COMPLEX_TYPE - && !DECL_COMPLEX_GIMPLE_REG_P (result)) - DECL_COMPLEX_GIMPLE_REG_P (base_m) = 0; + else if (TREE_CODE (TREE_TYPE (result)) == COMPLEX_TYPE + && !DECL_COMPLEX_GIMPLE_REG_P (result) + && DECL_COMPLEX_GIMPLE_REG_P (base_m)) + use_it = false; else if (!TREE_ADDRESSABLE (base_m)) use_it = true; }