🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #895

bug report version 1.36

#895
From: Steven McCanne
Date: Sat, 20 Jan 1990 03:56
49 lines
1924 bytes
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;
      }
Technical Details
Message-ID: <9001200356.AA02233@helios.ee.lbl.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!HELIOS.EE.LBL.GOV!mccanne

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!HELIOS.EE.LBL.GOV!mccanne
From: mccanne@HELIOS.EE.LBL.GOV (Steven McCanne)
Newsgroups: gnu.gcc.bug
Subject: bug report version 1.36
Message-ID: <9001200356.AA02233@helios.ee.lbl.gov>
Date: 20 Jan 90 03:56:10 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 49