------- Comment #5 from rguenther at suse dot de  2007-07-07 15:24 -------
Subject: Re:  [4.3 regression] 25_algorithms/search_n/iterator.cc:
 pch-related verify_ssa failure

On Sat, 7 Jul 2007, hp at gcc dot gnu dot org wrote:

> ------- Comment #4 from hp at gcc dot gnu dot org  2007-07-07 15:17 -------
> In reply to comment #4: confirmed.  I've now confirmed that it is commit 
> 126198
> that exposed this bug, so I'll remove all other people from CC.  You're very
> welcome to add yourself back, of course. :)  Richi, if you can shed some light
> on what optimizations (what passes) your patch helped (caused more work for)
> the most, I'd be grateful. Or if you just fix the bug. :)  There are trees
> named regress126197 and regress126198 in my home directory on gcc11 on the
> compile farm... where you don't have an account, bother.

So the only real change in this patch is in the following hunk:

Index: tree-inline.c
===================================================================
--- tree-inline.c       (revision 126197)
+++ tree-inline.c       (revision 126198)
@@ -1278,10 +1278,15 @@ setup_one_parameter (copy_body_data *id,
   tree init_stmt;
   tree var;
   tree var_sub;
-  tree rhs = value ? fold_convert (TREE_TYPE (p), value) : NULL;
+  tree rhs = value;
   tree def = (gimple_in_ssa_p (cfun)
              ? gimple_default_def (id->src_cfun, p) : NULL);

+  if (value
+      && value != error_mark_node
+      && !useless_type_conversion_p (TREE_TYPE (p), TREE_TYPE (value)))
+    rhs = fold_build1 (NOP_EXPR, TREE_TYPE (p), value);
+
   /* If the parameter is never assigned to, has no SSA_NAMEs created,
      we may not need to create a new variable here at all.  Instead, we 
may
      be able to just use the argument value.  */


See also PR32624.  Can you check if changing this part like in
comment #4 of that PR fixes this bug?  It will only result in
less casts and less temporaries, but as can be seen from PR32624
this has some strange effects.

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32636

Reply via email to