re PR debug/80025 (ICE w/ -O2 (-O3, -Ofast) -g -ftracer (infinite recursion in rtx_eq...
authorJakub Jelinek <jakub@redhat.com>
Fri, 31 Mar 2017 06:05:47 +0000 (08:05 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 31 Mar 2017 06:05:47 +0000 (08:05 +0200)
commit005f12bf67e60ada0757470be80fe69799a83ebc
treefed7ca22248ee3191aed93f460ee299ae4d40758
parent62a767024c694e9ab52b142689180979213e9684
re PR debug/80025 (ICE w/ -O2 (-O3, -Ofast) -g -ftracer (infinite recursion in rtx_equal_for_cselib_1))

PR debug/80025
* cselib.h (rtx_equal_for_cselib_1): Add depth argument.
(rtx_equal_for_cselib_p): Pass 0 to it.
* cselib.c (cselib_hasher::equal): Likewise.
(rtx_equal_for_cselib_1): Add depth argument.  If depth
is 128, don't look up VALUE locs and punt.  Increment
depth in recursive calls when walking VALUE locs.

* gcc.dg/torture/pr80025.c: New test.

From-SVN: r246606
gcc/ChangeLog
gcc/cselib.c
gcc/cselib.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr80025.c [new file with mode: 0644]