ggc-simple.c (ggc_free_rtx): Poison the correct amount for the rtx length.
authorRichard Henderson <rth@cygnus.com>
Wed, 8 Sep 1999 23:02:12 +0000 (16:02 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 8 Sep 1999 23:02:12 +0000 (16:02 -0700)
        * ggc-simple.c (ggc_free_rtx): Poison the correct amount
        for the rtx length.

From-SVN: r29215

gcc/ChangeLog
gcc/ggc-simple.c

index 5afd3f9977c465c14447344cb467dd610f91a498..ce1571ced6e2500ee81c5d614b665377b76af67a 100644 (file)
@@ -1,4 +1,9 @@
-Wed Sep  8 15:23:54 1999  Ricahrd Henderson  <rth@cygnus.com>
+Wed Sep  8 16:01:14 1999  Richard Henderson  <rth@cygnus.com>
+
+       * ggc-simple.c (ggc_free_rtx): Poison the correct amount
+       for the rtx length.
+
+Wed Sep  8 15:23:54 1999  Richard Henderson  <rth@cygnus.com>
 
        * alpha.md (call value patterns): Remove the result predicates.
 
index 5e695ad1b547bb8589f8ffcd982556bac9ecca1a..f5e5a9740f30d94731e18138f42291bd6807cc9b 100644 (file)
@@ -300,7 +300,8 @@ ggc_free_rtx (r)
   fprintf (dump, "collect rtx %p\n", &r->rtx);
 #endif
 #ifdef GGC_POISON
-  memset (r, 0xAA, sizeof(*r));
+  memset (r, 0xAA, sizeof(*r) + ((GET_RTX_LENGTH (r->rtx.code) -1)
+                                * sizeof(rtunion)));
 #endif
 
   free (r);