Commit e4722b81 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/92452 (ICE in vrp_prop::check_array_ref at tree-vrp.c:4153)

	PR tree-optimization/92452
	* tree-vrp.c (vrp_prop::check_array_ref): If TRUNC_DIV_EXPR folds
	into NULL_TREE, set up_bound to NULL_TREE instead of computing
	MINUS_EXPR on it.

	* c-c++-common/pr92452.c: New test.

From-SVN: r278080
parent f0309937
2019-11-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/92452
* tree-vrp.c (vrp_prop::check_array_ref): If TRUNC_DIV_EXPR folds
into NULL_TREE, set up_bound to NULL_TREE instead of computing
MINUS_EXPR on it.
2019-11-12 Andre Vieira <andre.simoesdiasvieira@arm.com>
* tree-vect-loop.c (vect_transform_loop): Don't overwrite epilogues
2019-11-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/92452
* c-c++-common/pr92452.c: New test.
2019-11-12 Andre Vieira <andre.simoesdiasvieira@arm.com>
* gcc.dg/vect/pr92347.c: New test.
......
/* PR tree-optimization/92452 */
/* { dg-do compile } */
/* { dg-options "-Os -Warray-bounds=1" } */
#include "pr60101.c"
......@@ -4150,8 +4150,11 @@ vrp_prop::check_array_ref (location_t location, tree ref,
up_bound_p1 = int_const_binop (TRUNC_DIV_EXPR, maxbound, eltsize);
up_bound = int_const_binop (MINUS_EXPR, up_bound_p1,
build_int_cst (ptrdiff_type_node, 1));
if (up_bound_p1 != NULL_TREE)
up_bound = int_const_binop (MINUS_EXPR, up_bound_p1,
build_int_cst (ptrdiff_type_node, 1));
else
up_bound = NULL_TREE;
}
}
else
......
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