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 expansion of TREE_ADDRESSABLE bitwise copies (PR c++/69851)


On Fri, Feb 19, 2016 at 06:42:32PM +0000, Bernd Edlinger wrote:
> Hi,
> 
> 
> > --- gcc/expr.c.jj	2016-02-12 00:50:55.000000000 +0100
> > +++ gcc/expr.c	2016-02-19 10:43:59.639162531 +0100
> > @@ -6643,14 +6643,24 @@ store_field (rtx target, HOST_WIDE_INT b
> >  	  /* Except for initialization of full bytes from a CONSTRUCTOR, which
> >  	     we will handle specially below.  */
> >  	  && !(TREE_CODE (exp) == CONSTRUCTOR
> > -	       && bitsize % BITS_PER_UNIT == 0))
> > +	       && bitsize % BITS_PER_UNIT == 0)
> > +	  /* And except for bitwise copying of TREE_ADDRESSABLE types,
> > +	     where the FIELD_DECL has the right bitsize, but TREE_TYPE (exp)
> > +	     includes some extra padding.  */
> > +	  && (!TREE_ADDRESSABLE (TREE_TYPE (exp))
> > +	      || TREE_CODE (exp) != COMPONENT_REF
> > +	      || TREE_CODE (DECL_SIZE (TREE_OPERAND (exp, 1))) != INTEGER_CST
> > +	      || (bitsize % BITS_PER_UNIT != 0)
> > +	      || (bitpos % BITS_PER_UNIT != 0)
> > +	      || (compare_tree_int (DECL_SIZE (TREE_OPERAND (exp, 1)), bitsize)
> > +		  != 0)))
> >        /* If we are expanding a MEM_REF of a non-BLKmode non-addressable
> >           decl we must use bitfield operations.  */
> 
> isn't the indentation of the new block wrong?

No, I think it is correct.

	Jakub


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