This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] fix latent & real bugs in BIT_FIELD_REFs
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Mar 2004 07:29:29 -0500
- Subject: Re: [tree-ssa] fix latent & real bugs in BIT_FIELD_REFs
- Organization: Red Hat Canada
- References: <20040324104956.GA10395@fencepost>
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.