Commit 48057089 by Kugan Vivekanandarajah Committed by Kugan Vivekanandarajah

re PR tree-optimization/77862 (ice in add_equivalence)

Fix PR77862
gcc/testsuite/ChangeLog:

2016-10-06  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR tree-optimization/77862
	* gcc.dg/pr77862.c: New test.

gcc/ChangeLog:

2016-10-06  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR tree-optimization/77862
	* tree-vrp.c (add_equivalence): Use get_value_range so that
	num_vr_values is checked before accessing vr_values.

From-SVN: r240842
parent 65b25c9b
2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org>
PR tree-optimization/77862
* tree-vrp.c (add_equivalence): Use get_value_range so that
num_vr_values is checked before accessing vr_values.
2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-vrp.c (evrp_dom_walker::before_dom_children): Handle
POINTER_TYPE_P.
......
2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org>
PR tree-optimization/77862
* gcc.dg/pr77862.c: New test.
2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org>
* gcc.dg/tree-ssa/evrp4.c: New test.
2016-10-06 Jeff Law <law@redhat.com>
......
/* PR tree-optimization/77862 */
/* { dg-do compile } */
/* { dg-options "-O2 -fPIC -w" } */
struct paramed_type
{
};
int a;
int memcmp ( int*, void *, long );
void
cur_token (void)
{
if ( 1 != a || memcmp ( cur_token, "", a ) )
return;
struct paramed_type b = { };
}
......@@ -842,7 +842,7 @@ static void
add_equivalence (bitmap *equiv, const_tree var)
{
unsigned ver = SSA_NAME_VERSION (var);
value_range *vr = vr_value[ver];
value_range *vr = get_value_range (var);
if (*equiv == NULL)
*equiv = BITMAP_ALLOC (&vrp_equiv_obstack);
......
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