summaryrefslogtreecommitdiff
path: root/gcc/ggc-simple.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-08 23:02:12 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-08 23:02:12 +0000
commitff897acc1ec2a69226de0c61f485485100af6142 (patch)
tree819f3f126bcab7b99239b1a270c802da18a7e353 /gcc/ggc-simple.c
parent08040227255ae98ea7e7fbfc8f64d94d4bff1351 (diff)
downloadgcc-ff897acc1ec2a69226de0c61f485485100af6142.tar.gz
* ggc-simple.c (ggc_free_rtx): Poison the correct amount
for the rtx length. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29215 138bc75d-0d04-0410-961f-82ee72b054a4
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 5e695ad1b54..f5e5a9740f3 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);