mirror of git://gcc.gnu.org/git/gcc.git
vrp76.c: New test.
2012-08-01 Tom de Vries <tom@codesourcery.com> * gcc.dg/tree-ssa/vrp76.c: New test. From-SVN: r190044
This commit is contained in:
parent
8bb37e9ad3
commit
ece401eecc
|
|
@ -1,3 +1,7 @@
|
||||||
|
2012-08-01 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
|
* gcc.dg/tree-ssa/vrp76.c: New test.
|
||||||
|
|
||||||
2012-08-01 Bill Schmidt <wschmidt@linux.ibm.com>
|
2012-08-01 Bill Schmidt <wschmidt@linux.ibm.com>
|
||||||
|
|
||||||
PR tree-optimization/46556
|
PR tree-optimization/46556
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
/* { dg-do link } */
|
||||||
|
/* { dg-options "-O2 -fno-tree-switch-conversion" } */
|
||||||
|
|
||||||
|
/* Based on f3 from vrp63.c, but with switch instead of if-chain. This test
|
||||||
|
tests the propagation of an anti-range in a switch statement. */
|
||||||
|
|
||||||
|
extern void link_error (void);
|
||||||
|
|
||||||
|
void
|
||||||
|
f3 (int s)
|
||||||
|
{
|
||||||
|
if (s >> 3 == -2)
|
||||||
|
/* s in range [ -16, -9]. */
|
||||||
|
;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* s in range ~[-16, -9], so none of the case labels can be taken. */
|
||||||
|
switch (s)
|
||||||
|
{
|
||||||
|
case -16:
|
||||||
|
case -12:
|
||||||
|
case -9:
|
||||||
|
link_error ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue