This is the mail archive of the gcc@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]

more simplify_subreg aborts


Here is an example that is similar to dj's (voidmode issues)
that is reproducible with the v850-elf port:

static unsigned int
size_of_encoded_value (unsigned char encoding)
{
  switch (encoding)
    {
    case 0x00:
      return 0;
    case 0x02:
      return 2;
    case 0x03:
      return 4;
    case 0x04:
      return 8;
    }
}

It needs to be compiled at -O2.  This patch allows
me to workaround the issue for the v850, at least.

Catherine

Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v
retrieving revision 1.61
diff -p -r1.61 simplify-rtx.c
*** simplify-rtx.c      2001/06/12 15:25:16     1.61
--- simplify-rtx.c      2001/06/28 16:29:43
*************** simplify_subreg (outermode, op, innermod
*** 2191,2197 ****
    /* Little bit of sanity checking.  */
    if (innermode == VOIDmode || outermode == VOIDmode
        || innermode == BLKmode || outermode == BLKmode)
!     abort ();
  
    if (GET_MODE (op) != innermode
        && GET_MODE (op) != VOIDmode)
--- 2191,2197 ----
    /* Little bit of sanity checking.  */
    if (innermode == VOIDmode || outermode == VOIDmode
        || innermode == BLKmode || outermode == BLKmode)
!     return 0;
  
    if (GET_MODE (op) != innermode
        && GET_MODE (op) != VOIDmode)
*************** simplify_gen_subreg (outermode, op, inne
*** 2449,2455 ****
    /* Little bit of sanity checking.  */
    if (innermode == VOIDmode || outermode == VOIDmode
        || innermode == BLKmode || outermode == BLKmode)
!     abort ();
  
    if (GET_MODE (op) != innermode
        && GET_MODE (op) != VOIDmode)
--- 2449,2455 ----
    /* Little bit of sanity checking.  */
    if (innermode == VOIDmode || outermode == VOIDmode
        || innermode == BLKmode || outermode == BLKmode)
!     return 0;
  
    if (GET_MODE (op) != innermode
        && GET_MODE (op) != VOIDmode)


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