re PR debug/51746 (Segfault in cselib_preserved_value_p)
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 6 Jan 2012 20:20:55 +0000 (20:20 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 6 Jan 2012 20:20:55 +0000 (20:20 +0000)
PR debug/51746
* cselib.c (cselib_hash_rtx): Hash incoming VALUEs too.

From-SVN: r182963

gcc/ChangeLog
gcc/cselib.c

index 0457656b3ff945d19bf5969b481a2adfac51c768..2c65a6ad0b18dde709e70b49503b9ea60514a623 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-06  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR debug/51746
+       * cselib.c (cselib_hash_rtx): Hash incoming VALUEs too.
+
 2012-01-06  Arnaud Charlet  <charlet@adacore.com>
 
        * c-decl.c (ext_block): Moved up.
index 9934abb8f41fc95af8637d255fd2b8b7628a5ab6..7db24ae729aac097895b307b0310a89da36eb8bd 100644 (file)
@@ -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);