diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-03-31 08:05:47 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-03-31 08:05:47 +0200 |
commit | 005f12bf67e60ada0757470be80fe69799a83ebc (patch) | |
tree | fed7ca22248ee3191aed93f460ee299ae4d40758 /gcc/cselib.h | |
parent | 62a767024c694e9ab52b142689180979213e9684 (diff) | |
download | gcc-005f12bf67e60ada0757470be80fe69799a83ebc.zip gcc-005f12bf67e60ada0757470be80fe69799a83ebc.tar.gz gcc-005f12bf67e60ada0757470be80fe69799a83ebc.tar.bz2 |
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
Diffstat (limited to 'gcc/cselib.h')
-rw-r--r-- | gcc/cselib.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cselib.h b/gcc/cselib.h index 1a8d7f2..dd94919 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -82,7 +82,7 @@ extern void cselib_finish (void); extern void cselib_process_insn (rtx_insn *); extern bool fp_setter_insn (rtx_insn *); extern machine_mode cselib_reg_set_mode (const_rtx); -extern int rtx_equal_for_cselib_1 (rtx, rtx, machine_mode); +extern int rtx_equal_for_cselib_1 (rtx, rtx, machine_mode, int); extern int references_value_p (const_rtx, int); extern rtx cselib_expand_value_rtx (rtx, bitmap, int); typedef rtx (*cselib_expand_callback)(rtx, bitmap, int, void *); @@ -134,7 +134,7 @@ rtx_equal_for_cselib_p (rtx x, rtx y) if (x == y) return 1; - return rtx_equal_for_cselib_1 (x, y, VOIDmode); + return rtx_equal_for_cselib_1 (x, y, VOIDmode, 0); } #endif /* GCC_CSELIB_H */ |