sparseset.h (sparseset_pop): Fix the wrong index.
authorGuozhi Wei <carrot@google.com>
Mon, 24 Feb 2014 18:35:54 +0000 (18:35 +0000)
committerWei Guozhi <carrot@gcc.gnu.org>
Mon, 24 Feb 2014 18:35:54 +0000 (18:35 +0000)
* sparseset.h (sparseset_pop): Fix the wrong index.

From-SVN: r208091

gcc/ChangeLog
gcc/sparseset.h

index 6371f2b9c3003d307aaa9e8152297099328ed887..9c1faac4e30e9b18d6465dd04e4312edf7790163 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-24  Guozhi Wei  <carrot@google.com>
+
+       * sparseset.h (sparseset_pop): Fix the wrong index.
+
 2014-02-24  Walter Lee  <walt@tilera.com>
 
        * config.gcc (tilepro-*-*): Change to tilepro*-*-*.
 2014-02-24  Walter Lee  <walt@tilera.com>
 
        * config.gcc (tilepro-*-*): Change to tilepro*-*-*.
index a6854e583457be6e0b9b390956272115ab289ea5..8c7f3efcdceb817ea354b5978b5947f156ef3e8e 100644 (file)
@@ -177,7 +177,7 @@ sparseset_pop (sparseset s)
   gcc_checking_assert (mem != 0);
 
   s->members = mem - 1;
   gcc_checking_assert (mem != 0);
 
   s->members = mem - 1;
-  return s->dense[mem];
+  return s->dense[s->members];
 }
 
 static inline void
 }
 
 static inline void