This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] Reinstating reverted tree-ssa-dom.c changes from last week


I'm reinstating the tree-ssa-dom.c changes that I reverted last week with a
trivial fix.

I was able to reproduce David Edelsohn's failure on an old PPC box.  The
failure was some code like this

free (object);
if (TREE_CODE (object->something) == SOMECODE) ...

Opps.  Dumb.  I've fixed that goof.  Bootstrapped and regression tested on
i686-pc-linux-gnu.  I've also verified that my PPC bootstraps pass their
previous failure point (the bootstrap itself won't finish until tomorrow
or possibly even later).

[ I'm only including the fix in the posted diff.  The rest of the changes
  are idential to those from 2004-04-12. ]

        * tree-ssa-dom.c: Reinstate all changes from 2004-04-12.
        (lookup_avail_expr): Do not access a hash table object after
        it has been freed.


Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dom.c,v
retrieving revision 1.1.2.154
diff -c -r1.1.2.154 tree-ssa-dom.c
*** tree-ssa-dom.c	13 Apr 2004 15:02:34 -0000	1.1.2.154
--- tree-ssa-dom.c	19 Apr 2004 19:21:13 -0000
***************
*** 2758,2766 ****
  
        if (bitmap_bit_p (nonzero_vars, indx))
  	{
  	  free (element);
  
! 	  if (TREE_CODE (element->rhs) == EQ_EXPR)
  	    return boolean_false_node;
  	  else
  	    return boolean_true_node;
--- 2758,2767 ----
  
        if (bitmap_bit_p (nonzero_vars, indx))
  	{
+ 	  tree t = element->rhs;
  	  free (element);
  
! 	  if (TREE_CODE (t) == EQ_EXPR)
  	    return boolean_false_node;
  	  else
  	    return boolean_true_node;






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]