Commit 8c5285e1 by Diego Novillo Committed by Diego Novillo

re PR tree-optimization/24840 (ICE process_assert_insertions_for, at tree-vrp.c:2807)


	PR 24840
	* tree-vrp.c (infer_value_range): Return false if STMT is a
	block terminator and its basic block has no successors.

testsuite/

	PR 24840
	* gcc.dg/tree-ssa/pr24840.c: New test.

From-SVN: r106930
parent 1f4c2c57
2005-11-14 Diego Novillo <dnovillo@redhat.com>
PR 24840
* tree-vrp.c (infer_value_range): Return false if STMT is a
block terminator and its basic block has no successors.
2005-11-14 Mike Stump <mrs@apple.com> 2005-11-14 Mike Stump <mrs@apple.com>
* config/i386/i386.c (override_options): -masm=intel isn't * config/i386/i386.c (override_options): -masm=intel isn't
......
2005-11-14 Diego Novillo <dnovillo@redhat.com>
PR 24840
* gcc.dg/tree-ssa/pr24840.c: New test.
2005-11-14 Janis Johnson <janis187@us.ibm.com> 2005-11-14 Janis Johnson <janis187@us.ibm.com>
PR testsuite/24841 PR testsuite/24841
/* { dg-do compile } */
/* { dg-options "-O2" } */
typedef struct
{
int tag, y;
} Object;
void Err_Handler () __attribute__ ((__noreturn__));
int
P_Error (int argc, Object * argv)
{
if (((argv[1]).tag >> 1) != 11)
Wrong_Type (argv[1], 11);
Err_Handler (argv[0], argv[1], argc - 2, argv + 2);
}
...@@ -2221,6 +2221,13 @@ infer_value_range (tree stmt, tree op, enum tree_code *comp_code_p, tree *val_p) ...@@ -2221,6 +2221,13 @@ infer_value_range (tree stmt, tree op, enum tree_code *comp_code_p, tree *val_p)
if (tree_could_throw_p (stmt)) if (tree_could_throw_p (stmt))
return false; return false;
/* If STMT is the last statement of a basic block with no
successors, there is no point inferring anything about any of its
operands. We would not be able to find a proper insertion point
for the assertion, anyway. */
if (stmt_ends_bb_p (stmt) && EDGE_COUNT (bb_for_stmt (stmt)->succs) == 0)
return false;
if (POINTER_TYPE_P (TREE_TYPE (op))) if (POINTER_TYPE_P (TREE_TYPE (op)))
{ {
bool is_store; bool is_store;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment