This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix expansion of TREE_ADDRESSABLE bitwise copies (PR c++/69851)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bschmidt at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>, "jason at redhat dot com" <jason at redhat dot com>
- Date: Fri, 19 Feb 2016 20:04:47 +0100
- Subject: Re: [PATCH] Fix expansion of TREE_ADDRESSABLE bitwise copies (PR c++/69851)
- Authentication-results: sourceware.org; auth=none
- References: <HE1PR07MB09059275EE2C48C99026F453E4A00 at HE1PR07MB0905 dot eurprd07 dot prod dot outlook dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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