This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21348] New: tree-vrp.c:has_assert_expr is useless.
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2005 22:12:30 -0000
- Subject: [Bug tree-optimization/21348] New: tree-vrp.c:has_assert_expr is useless.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Coverage shows:
-: 1336:/* Return true if OP is the result of an ASSERT_EXPR that tests the
-: 1337: same condition as COND. */
-: 1338:
-: 1339:static bool
-: 1340:has_assert_expr (tree op, tree cond)
88954: 1341:{
88954: 1342: tree def_stmt = SSA_NAME_DEF_STMT (op);
-: 1343: tree assert_expr, other_cond, other_op;
-: 1344:
-: 1345: /* If OP was not generated by an ASSERT_EXPR, return false. */
88954: 1346: if (TREE_CODE (def_stmt) != MODIFY_EXPR
-: 1347: || TREE_CODE (TREE_OPERAND (def_stmt, 1)) != ASSERT_EXPR)
88954: 1348: return false;
-: 1349:
#####: 1350: assert_expr = TREE_OPERAND (def_stmt, 1);
#####: 1351: other_cond = ASSERT_EXPR_COND (assert_expr);
#####: 1352: other_op = ASSERT_EXPR_VAR (assert_expr);
This is because we don't insert ASSERT_EXPR before VRP.
The ASSERT_EXPRs that are inserted by VRP are not noticed by this function
because update_ssa is yet to be called.
--
Summary: tree-vrp.c:has_assert_expr is useless.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21348