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]

expr.c (emit_group_store): Handle a PARALLEL destination.


I checked in this patch to fix an irix6 -O0 core dump.  The testcase can be
found in gcc.c-torture/compile/981007-1.c.

Wed Oct  7 12:10:46 1998  Jim Wilson  <wilson@cygnus.com>

	* expr.c (emit_group_store): Handle a PARALLEL destination.

Index: expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.100
diff -p -r1.100 expr.c
*** expr.c	1998/10/01 13:00:18	1.100
--- expr.c	1998/10/07 19:10:13
*************** emit_group_store (orig_dst, src, ssize, 
*** 2006,2012 ****
    /* If we won't be storing directly into memory, protect the real destination
       from strange tricks we might play.  */
    dst = orig_dst;
!   if (GET_CODE (dst) != MEM)
      {
        dst = gen_reg_rtx (GET_MODE (orig_dst));
        /* Make life a bit easier for combine.  */
--- 2006,2031 ----
    /* If we won't be storing directly into memory, protect the real destination
       from strange tricks we might play.  */
    dst = orig_dst;
!   if (GET_CODE (dst) == PARALLEL)
!     {
!       rtx temp;
! 
!       /* We can get a PARALLEL dst if there is a conditional expression in
! 	 a return statement.  In that case, the dst and src are the same,
! 	 so no action is necessary.  */
!       if (rtx_equal_p (dst, src))
! 	return;
! 
!       /* It is unclear if we can ever reach here, but we may as well handle
! 	 it.  Allocate a temporary, and split this into a store/load to/from
! 	 the temporary.  */
! 
!       temp = assign_stack_temp (GET_MODE (dst), ssize, 0);
!       emit_group_store (temp, src, ssize, align);
!       emit_group_load (dst, temp, ssize, align);
!       return;
!     }
!   else if (GET_CODE (dst) != MEM)
      {
        dst = gen_reg_rtx (GET_MODE (orig_dst));
        /* Make life a bit easier for combine.  */


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