aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-simple.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-09-08 16:02:12 -0700
committerRichard Henderson <rth@gcc.gnu.org>1999-09-08 16:02:12 -0700
commit38792a9487a36149fc3af8ee550fc26839ebb65c (patch)
tree819f3f126bcab7b99239b1a270c802da18a7e353 /gcc/ggc-simple.c
parent3d46d5af2124ce7b3478145ae9775b0ced62643f (diff)
downloadgcc-38792a9487a36149fc3af8ee550fc26839ebb65c.zip
gcc-38792a9487a36149fc3af8ee550fc26839ebb65c.tar.gz
gcc-38792a9487a36149fc3af8ee550fc26839ebb65c.tar.bz2
ggc-simple.c (ggc_free_rtx): Poison the correct amount for the rtx length.
* ggc-simple.c (ggc_free_rtx): Poison the correct amount for the rtx length. From-SVN: r29215
Diffstat (limited to 'gcc/ggc-simple.c')
-rw-r--r--gcc/ggc-simple.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ggc-simple.c b/gcc/ggc-simple.c
index 5e695ad..f5e5a97 100644
--- a/gcc/ggc-simple.c
+++ b/gcc/ggc-simple.c
@@ -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);