diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-01-03 18:59:45 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-01-03 18:59:45 -0500 |
commit | 2151a093e30b2d7b1122924810d0427b8a438ca9 (patch) | |
tree | 6d0dedb9fcc98878f5b75ba46d22f95a9728c8fc /gcc/rtl.c | |
parent | 86daf4a655b3394385c6cf972939baf0aa021e8d (diff) | |
download | gcc-2151a093e30b2d7b1122924810d0427b8a438ca9.zip gcc-2151a093e30b2d7b1122924810d0427b8a438ca9.tar.gz gcc-2151a093e30b2d7b1122924810d0427b8a438ca9.tar.bz2 |
(rtx_alloc): Clear common area of rtx in a portable manner.
From-SVN: r3074
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -233,7 +233,14 @@ rtx_alloc (code) ob->next_free += length; ob->object_base = ob->next_free; - * (int *) rt = 0; + /* We want to clear everything up to the FLD array. Normally, this is + one int, but we don't want to assume that and it isn't very portable + anyway; this is. */ + + length = (sizeof (struct rtx_def) - sizeof (rtunion) - 1) / sizeof (int); + for (; length >= 0; length--) + ((int *) rt)[length] = 0; + PUT_CODE (rt, code); return rt; |