[PATCH] Fix SUBREG_BYTE bug in dbxout.c

Richard Henderson rth@redhat.com
Fri Aug 3 14:46:00 GMT 2001


On Fri, Aug 03, 2001 at 05:30:28PM -0400, Jakub Jelinek wrote:
> The problem is that home can be SUBREG of some pseudo, not hard register.
> Then alter_subreg will abort (well, subreg_hard_regno).

Ok, then did you mean something like this?
(I'm still hung up on your noop call to alter_subreg.)


r~



Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dbxout.c,v
retrieving revision 1.99
diff -c -p -d -r1.99 dbxout.c
*** dbxout.c	2001/07/26 06:56:12	1.99
--- dbxout.c	2001/08/03 21:45:11
*************** dbxout_symbol_location (decl, type, suff
*** 2096,2108 ****
       If the decl was from an inline function, then its rtl
       is not identically the rtl that was used in this
       particular compilation.  */
!   if (GET_CODE (home) == REG)
!     {
!       regno = REGNO (home);
!       if (regno >= FIRST_PSEUDO_REGISTER)
! 	return 0;
!     }
!   else if (GET_CODE (home) == SUBREG)
      {
        rtx value = home;
  
--- 2096,2102 ----
       If the decl was from an inline function, then its rtl
       is not identically the rtl that was used in this
       particular compilation.  */
!   if (GET_CODE (home) == SUBREG)
      {
        rtx value = home;
  
*************** dbxout_symbol_location (decl, type, suff
*** 2113,2119 ****
  	  if (REGNO (value) >= FIRST_PSEUDO_REGISTER)
  	    return 0;
  	}
!       regno = REGNO (alter_subreg (home));
      }
  
    /* The kind-of-variable letter depends on where
--- 2107,2119 ----
  	  if (REGNO (value) >= FIRST_PSEUDO_REGISTER)
  	    return 0;
  	}
!       home = alter_subreg (home);
!     }
!   if (GET_CODE (home) == REG)
!     {
!       regno = REGNO (home);
!       if (regno >= FIRST_PSEUDO_REGISTER)
! 	return 0;
      }
  
    /* The kind-of-variable letter depends on where



More information about the Gcc-patches mailing list