Commit 4192f0d2 by Geoffrey Keating Committed by Geoffrey Keating

stormy16.c (xstormy16_expand_casesi): Don't change INDEX.

	* config/stormy16/stormy16.c (xstormy16_expand_casesi):
	Don't change INDEX.

In testsuite/:

	* gcc.c-torture/execute/20011109-1.c: New test.

From-SVN: r46899
parent a4311dfe
2001-11-09 Geoffrey Keating <geoffk@redhat.com>
* config/stormy16/stormy16.c (xstormy16_expand_casesi):
Don't change INDEX.
Fri Nov 9 17:51:09 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Fri Nov 9 17:51:09 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* alias.c (nonoverlapping_memrefs_p): New function. * alias.c (nonoverlapping_memrefs_p): New function.
......
...@@ -1621,7 +1621,7 @@ xstormy16_expand_casesi (index, lower_bound, range, table, default_label) ...@@ -1621,7 +1621,7 @@ xstormy16_expand_casesi (index, lower_bound, range, table, default_label)
sorry ("switch statement of size %lu entries too large", sorry ("switch statement of size %lu entries too large",
(unsigned long) range_i); (unsigned long) range_i);
index = expand_binop (SImode, sub_optab, index, lower_bound, index, 0, index = expand_binop (SImode, sub_optab, index, lower_bound, NULL_RTX, 0,
OPTAB_LIB_WIDEN); OPTAB_LIB_WIDEN);
emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, SImode, 1, emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, SImode, 1,
0, default_label); 0, default_label);
......
2001-11-09 Geoffrey Keating <geoffk@redhat.com>
* gcc.c-torture/execute/20011109-1.c: New test.
2001-11-09 Jakub Jelinek <jakub@redhat.com> 2001-11-09 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20011109-1.c: New test. * gcc.c-torture/compile/20011109-1.c: New test.
......
void fail1(void)
{
abort ();
}
void fail2(void)
{
abort ();
}
void fail3(void)
{
abort ();
}
void fail4(void)
{
abort ();
}
void foo(long x)
{
switch (x)
{
case -6:
fail1 (); break;
case 0:
fail2 (); break;
case 1: case 2:
break;
case 3: case 4: case 5:
fail3 ();
break;
default:
fail4 ();
break;
}
switch (x)
{
case -3:
fail1 (); break;
case 0: case 4:
fail2 (); break;
case 1: case 3:
break;
case 2: case 8:
abort ();
break;
default:
fail4 ();
break;
}
}
int main(void)
{
foo (1);
exit (0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment