This is the mail archive of the 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: [tree-ssa] fix latent & real bugs in BIT_FIELD_REFs

On Wed, 2004-03-24 at 05:49, Bonzini wrote:

> Note that in that case BIT_FIELD_REFs can
> refer to both real and virtual operands, so get_virtual_var should check
> if the BIT_FIELD_REF refers to a non-register operand.  Luckily a test
> case was easy to build.
Hmm, this is not safe, get_virtual_var should only be called for
aggregates, which are always non-registers.  The test for !is_gimple_reg
in get_virtual_var should not be necessary.

The rest looks OK.

> 	* gcc.dg/tree-ssa/20040324-1.c: New testcase.
For future reference, you can generate diffs for new files by adding the
file with 'cvs add' and getting a diff with 'cvs diff -N'.

> @@ -1012,7 +1012,8 @@ get_expr_operands (tree stmt, tree *expr
>  	   will not be constant propagated because the two partial
>  	   definitions to 'a' will kill each other.  Note that SRA may be
>  	   able to fix this problem if 'a' can be scalarized.  */
> -  if (code == IMAGPART_EXPR || code == REALPART_EXPR || code == COMPONENT_REF)
> +  if (code == IMAGPART_EXPR || code == REALPART_EXPR || code == COMPONENT_REF
> +      || code == BIT_FIELD_REF)
OK, but format one test per line.


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