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]

Re: [PATCH] Fix copy_reference_ops_from_ref


On Tue, 2 Jun 2009, Richard Guenther wrote:

> On Tue, 2 Jun 2009, Richard Kenner wrote:
> 
> > >   	      && host_integerp (TYPE_SIZE (TREE_TYPE (temp.op0)), 0))
> > > ! 	    temp.op0 = DECL_SIZE (temp.op0);
> > 
> > Shouldn't that first line use DECL_SIZE as well?  Why test one and use
> > the other?
> 
> Doh, yes.  Fix in testing.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2009-06-03  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use DECL_SIZE
	consistently.

Index: tree-ssa-sccvn.c
===================================================================
--- tree-ssa-sccvn.c	(revision 148086)
+++ tree-ssa-sccvn.c	(working copy)
@@ -554,7 +554,7 @@ copy_reference_ops_from_ref (tree ref, V
 	      && TREE_CODE (DECL_CONTEXT (temp.op0)) == UNION_TYPE
 	      && integer_zerop (DECL_FIELD_OFFSET (temp.op0))
 	      && integer_zerop (DECL_FIELD_BIT_OFFSET (temp.op0))
-	      && host_integerp (TYPE_SIZE (TREE_TYPE (temp.op0)), 0))
+	      && host_integerp (DECL_SIZE (temp.op0), 0))
 	    temp.op0 = DECL_SIZE (temp.op0);
 	  break;
 	case ARRAY_RANGE_REF:


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