aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2005-04-11 22:06:46 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2005-04-11 18:06:46 -0400
commitf8d66d34f711e94a48b1eb28ab0fa25c6e1404c9 (patch)
treeea3a6eedbf40f8febad0a55f21fd8d5f0af2123d /gcc/tree-ssa.c
parent9f32d037484306f1045b661d9bf29e893d846ede (diff)
downloadgcc-f8d66d34f711e94a48b1eb28ab0fa25c6e1404c9.zip
gcc-f8d66d34f711e94a48b1eb28ab0fa25c6e1404c9.tar.gz
gcc-f8d66d34f711e94a48b1eb28ab0fa25c6e1404c9.tar.bz2
re PR middle-end/20933 (gcc can no longer bootstrap itself)
PR tree-optimization/20933 * tree-ssa-alias.c (compute_flow_insensitive_aliasing): Move logic to reject aliases between read-only and writable variables ... (may_alias_p): ... here. (get_tmt_for): Do not associate read-only tags to pointers whose pointed-to type is not read-only. * tree-ssa.c (verify_ssa): Check that memory stores have at least one V_MAY_DEF or V_MUST_DEF. testsuite/ChangeLog PR tree-optimization/20933 * gcc.dg/tree-ssa/pr20933.c: New test. From-SVN: r97988
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index c152f82..1e232e3 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -707,16 +707,37 @@ verify_ssa (bool check_modified_stmt)
goto err;
}
+ if (TREE_CODE (stmt) == MODIFY_EXPR
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) != SSA_NAME)
+ {
+ tree lhs, base_address;
+
+ lhs = TREE_OPERAND (stmt, 0);
+ base_address = get_base_address (lhs);
- if (stmt_ann (stmt)->makes_aliased_stores
- && NUM_V_MAY_DEFS (STMT_V_MAY_DEF_OPS (stmt)) == 0)
+ if (base_address
+ && SSA_VAR_P (base_address)
+ && NUM_V_MAY_DEFS (STMT_V_MAY_DEF_OPS (stmt)) == 0
+ && NUM_V_MUST_DEFS (STMT_V_MUST_DEF_OPS (stmt)) == 0)
{
- error ("Statement makes aliased stores, but has no V_MAY_DEFS");
+ error ("Statement makes a memory store, but has no "
+ "V_MAY_DEFS nor V_MUST_DEFS");
print_generic_stmt (stderr, stmt, TDF_VOPS);
goto err;
}
+ }
+
+
+ if (stmt_ann (stmt)->makes_aliased_stores
+ && NUM_V_MAY_DEFS (STMT_V_MAY_DEF_OPS (stmt)) == 0)
+ {
+ error ("Statement makes aliased stores, but has no V_MAY_DEFS");
+ print_generic_stmt (stderr, stmt, TDF_VOPS);
+ goto err;
+ }
- FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES | SSA_OP_ALL_KILLS)
+ FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter,
+ SSA_OP_ALL_USES | SSA_OP_ALL_KILLS)
{
op = USE_FROM_PTR (use_p);
if (verify_use (bb, definition_block[SSA_NAME_VERSION (op)],