From 7483eef82aecf04dc30cd9d835d1691f6073ebd6 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 6 Jan 2012 20:20:55 +0000 Subject: [PATCH] re PR debug/51746 (Segfault in cselib_preserved_value_p) PR debug/51746 * cselib.c (cselib_hash_rtx): Hash incoming VALUEs too. From-SVN: r182963 --- gcc/ChangeLog | 5 +++++ gcc/cselib.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0457656b3ff..2c65a6ad0b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-06 Alexandre Oliva + + PR debug/51746 + * cselib.c (cselib_hash_rtx): Hash incoming VALUEs too. + 2012-01-06 Arnaud Charlet * c-decl.c (ext_block): Moved up. diff --git a/gcc/cselib.c b/gcc/cselib.c index 9934abb8f41..7db24ae729a 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -1020,6 +1020,10 @@ cselib_hash_rtx (rtx x, int create, enum machine_mode memmode) switch (code) { + case VALUE: + e = CSELIB_VAL_PTR (x); + return e->hash; + case MEM: case REG: e = cselib_lookup (x, GET_MODE (x), create, memmode);