mccanne@HELIOS.EE.LBL.GOV (Steven McCanne) (01/20/90)
This problem surfaced when I was mucking around with the rtx struct. The bcopy's in copy_for_inline and copy_rtx_if_shared assume that the size of an rtunion and the combined size of the code/mode/etc fields equal sizeof(int). Steve McCanne *** integrate.c.~1~ Thu Oct 12 16:53:16 1989 --- integrate.c Fri Jan 19 19:42:14 1990 *************** *** 521,527 **** /* Replace this rtx with a copy of itself. */ x = rtx_alloc (code); ! bcopy (orig, x, sizeof (int) * (GET_RTX_LENGTH (code) + 1)); /* Now scan the subexpressions recursively. We can store any replaced subexpressions directly into X --- 521,528 ---- /* Replace this rtx with a copy of itself. */ x = rtx_alloc (code); ! bcopy (orig, x, sizeof (*x) - sizeof (x->fld) + ! sizeof (x->fld[0]) * GET_RTX_LENGTH (code)); /* Now scan the subexpressions recursively. We can store any replaced subexpressions directly into X *** emit-rtl.c.~1~ Wed Sep 20 21:33:11 1989 --- emit-rtl.c Fri Jan 19 19:44:28 1990 *************** *** 646,652 **** unshare_copies++; copy = rtx_alloc (code); ! bcopy (x, copy, sizeof (int) * (GET_RTX_LENGTH (code) + 1)); x = copy; copied = 1; } --- 646,653 ---- unshare_copies++; copy = rtx_alloc (code); ! bcopy (x, copy, sizeof (*copy) - sizeof (copy->fld) + ! sizeof (copy->fld[0]) * GET_RTX_LENGTH (code)); x = copy; copied = 1; }