[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-12-07 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

kugan at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from kugan at gcc dot gnu.org ---
Fixed in trunk.

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-12-07 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

--- Comment #7 from David Binderman  ---
(In reply to Jakub Jelinek from comment #6)
> So is this fixed now?

It seems fixed to me. Latest gcc trunk.

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-12-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek  ---
So is this fixed now?

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-10-06 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

--- Comment #5 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Thu Oct  6 19:58:46 2016
New Revision: 240842

URL: https://gcc.gnu.org/viewcvs?rev=240842&root=gcc&view=rev
Log:
Fix PR77862
gcc/testsuite/ChangeLog:

2016-10-06  Kugan Vivekanandarajah  

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

gcc/ChangeLog:

2016-10-06  Kugan Vivekanandarajah  

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



Added:
trunk/gcc/testsuite/gcc.dg/pr77862.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-10-05 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

--- Comment #4 from kugan at gcc dot gnu.org ---
patch posted for review at:
https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00349.html

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-10-05 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

--- Comment #3 from Martin Liška  ---
==8593== Invalid read of size 8
==8593==at 0x10E0E64: add_equivalence(bitmap_head**, tree_node const*)
(tree-vrp.c:845)
==8593==by 0x10E29BE:
extract_range_for_var_from_comparison_expr(tree_node*, tree_code, tree_node*,
tree_node*, value_range*) (tree-vrp.c:1538)
==8593==by 0x110244D:
evrp_dom_walker::before_dom_children(basic_block_def*) (tree-vrp.c:10685)
==8593==by 0x1681362: dom_walker::walk(basic_block_def*) (domwalk.c:265)
==8593==by 0x1102EC4: execute_early_vrp() (tree-vrp.c:10878)
==8593==by 0x110344A: (anonymous
namespace)::pass_early_vrp::execute(function*) (tree-vrp.c:11107)
==8593==by 0xCF45D2: execute_one_pass(opt_pass*) (passes.c:2340)
==8593==by 0xCF4923: execute_pass_list_1(opt_pass*) (passes.c:2429)
==8593==by 0xCF4954: execute_pass_list_1(opt_pass*) (passes.c:2430)
==8593==by 0xCF49AC: execute_pass_list(function*, opt_pass*)
(passes.c:2440)
==8593==by 0xCF2EF4: do_per_function_toporder(void (*)(function*, void*),
void*) (passes.c:1728)
==8593==by 0xCF5595: execute_ipa_pass_list(opt_pass*) (passes.c:2782)
==8593==  Address 0x6514680 is 0 bytes after a block of size 80 alloc'd
==8593==at 0x4C2F0F5: calloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==8593==by 0x183AFD0: xcalloc (xmalloc.c:163)
==8593==by 0x10F659B: vrp_initialize_lattice() (tree-vrp.c:7002)
==8593==by 0x1102E9B: execute_early_vrp() (tree-vrp.c:10874)
==8593==by 0x110344A: (anonymous
namespace)::pass_early_vrp::execute(function*) (tree-vrp.c:11107)
==8593==by 0xCF45D2: execute_one_pass(opt_pass*) (passes.c:2340)
==8593==by 0xCF4923: execute_pass_list_1(opt_pass*) (passes.c:2429)
==8593==by 0xCF4954: execute_pass_list_1(opt_pass*) (passes.c:2430)
==8593==by 0xCF49AC: execute_pass_list(function*, opt_pass*)
(passes.c:2440)
==8593==by 0xCF2EF4: do_per_function_toporder(void (*)(function*, void*),
void*) (passes.c:1728)
==8593==by 0xCF5595: execute_ipa_pass_list(opt_pass*) (passes.c:2782)
==8593==by 0x93977E: ipa_passes() (cgraphunit.c:2278)

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-10-05 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

--- Comment #2 from Martin Liška  ---
Started with r240291.

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-10-05 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-05
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, minimal test-case:

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 = { };
}

[Bug tree-optimization/77862] [7 Regression] ice in add_equivalence

2016-10-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77862

Richard Biener  changed:

   What|Removed |Added

 CC||kugan at gcc dot gnu.org
  Component|c   |tree-optimization
   Target Milestone|--- |7.0
Summary|ice in add_equivalence  |[7 Regression] ice in
   ||add_equivalence