This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix v_must_def vs subvars
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 May 2005 21:15:24 -0700
- Subject: fix v_must_def vs subvars
Noticed while fixing something else. Tested on i686-linux.
r~
Index: tree-ssa-operands.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-operands.c,v
retrieving revision 2.83
diff -u -p -d -r2.83 tree-ssa-operands.c
--- tree-ssa-operands.c 18 May 2005 13:26:17 -0000 2.83
+++ tree-ssa-operands.c 19 May 2005 04:07:20 -0000
@@ -1326,7 +1330,7 @@ get_expr_operands (tree stmt, tree *expr
bool exact;
if (overlap_subvar (offset, size, sv, &exact))
{
- if (exact)
+ if (!exact)
flags &= ~opf_kill_def;
add_stmt_operand (&sv->var, s_ann, flags);
}
Index: testsuite/gcc.dg/tree-ssa/20031015-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/20031015-1.c,v
retrieving revision 1.5
diff -u -p -d -r1.5 20031015-1.c
--- testsuite/gcc.dg/tree-ssa/20031015-1.c 31 Mar 2005 18:34:15 -0000 1.5
+++ testsuite/gcc.dg/tree-ssa/20031015-1.c 19 May 2005 04:10:52 -0000
@@ -13,5 +13,8 @@ main(void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 2 "alias1" } } */
+/* The V_MUST_DEF comes from the initial assignment; the V_MAY_DEF
+ comes from the asm. */
+/* { dg-final { scan-tree-dump-times "V_MUST_DEF" 1 "alias1" } } */
+/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 1 "alias1" } } */
/* { dg-final { cleanup-tree-dump "alias1" } } */