This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix b-i-b, sibcall failure


recog_for_combine uses shallow_copy_rtx, and the later failed
to copy the SIBLING_CALL_P bit.  

Not sure what someone was thinking here -- we can just blat
the entire structure across.


r~


        * rtl.c (shallow_copy_rtx): Use memcpy for the entire node.

Index: rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.c,v
retrieving revision 1.117.8.1
diff -c -p -d -r1.117.8.1 rtl.c
*** rtl.c	17 Sep 2002 22:58:46 -0000	1.117.8.1
--- rtl.c	14 Oct 2002 00:38:34 -0000
*************** rtx
*** 387,405 ****
  shallow_copy_rtx (orig)
       rtx orig;
  {
-   int i;
    RTX_CODE code = GET_CODE (orig);
!   rtx copy = rtx_alloc (code);
! 
!   PUT_MODE (copy, GET_MODE (orig));
!   RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
!   RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
!   RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
!   RTX_FLAG (copy, integrated) = RTX_FLAG (orig, integrated);
!   RTX_FLAG (copy, frame_related) = RTX_FLAG (orig, frame_related);
  
!   for (i = 0; i < GET_RTX_LENGTH (code); i++)
!     copy->fld[i] = orig->fld[i];
  
    return copy;
  }
--- 387,398 ----
  shallow_copy_rtx (orig)
       rtx orig;
  {
    RTX_CODE code = GET_CODE (orig);
!   size_t n = GET_RTX_LENGTH (code);
!   rtx copy = ggc_alloc_rtx (n);
  
!   memcpy (copy, orig,
! 	  sizeof (struct rtx_def) + sizeof (rtunion) * (n - 1));
  
    return copy;
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]