re PR target/17119 ([m32r] ICE at switch case 0x8000)

PR target/17119.
config/m32r.c (gen_compare): Use reg_or_int16_operand when checking for a
  valid constant, regardless of sign.
testsuite/gcc.c-torture/compile/pr17119.c: New test (for this failure)

From-SVN: r86619
This commit is contained in:
Nick Clifton 2004-08-26 13:03:02 +00:00
parent ed8e443a42
commit b72e46f000
4 changed files with 31 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2004-08-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
PR target/17119.
* config/m32r.c (gen_compare): Use reg_or_int16_operand when
checking for a valid constant, regardless of sign.
2004-08-25 Richard Henderson <rth@redhat.com>
PR target/16974

View File

@ -1174,11 +1174,8 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
y = force_reg (GET_MODE (x), y);
else
{
int ok_const =
(code == LTU || code == LEU || code == GTU || code == GEU)
? uint16_operand (y, GET_MODE (y))
: reg_or_cmp_int16_operand (y, GET_MODE (y));
int ok_const = reg_or_int16_operand (y, GET_MODE (y));
if (! ok_const)
y = force_reg (GET_MODE (x), y);
}

View File

@ -1,3 +1,7 @@
2004-08-26 Nick Clifton <nickc@redhat.com>
* gcc.c-torture/compile/pr17119.c: New test.
2004-08-26 Joseph S. Myers <jsm@polyomino.org.uk>
* gcc.dg/c90-typespec-1.c, gcc.dg/c99-typespec-1.c: New tests.

View File

@ -0,0 +1,19 @@
void
_mesa_DrawPixels (int width, int height, unsigned format,
unsigned type, const void * pixels)
{
switch (format)
{
case 0x1900:
func1 ();
break;
case 0x1907:
case 0x80E0:
case 0x1908:
case 0x80E1:
case 0x8000:
func2 ();
break;
}
}