diff options
author | Tom de Vries <tom@codesourcery.com> | 2012-08-06 08:32:27 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2012-08-06 08:32:27 +0000 |
commit | aa24a99beeeef149925c540f5f252a2e9b41b493 (patch) | |
tree | df04b0c7ca9d1518b1e8cf5efc39046549e30ff7 /gcc | |
parent | d9e408ded1129fa823d55137eb1cb2c1a9979adb (diff) | |
download | gcc-aa24a99beeeef149925c540f5f252a2e9b41b493.zip gcc-aa24a99beeeef149925c540f5f252a2e9b41b493.tar.gz gcc-aa24a99beeeef149925c540f5f252a2e9b41b493.tar.bz2 |
vrp78.c: New test.
2012-08-06 Tom de Vries <tom@codesourcery.com>
* gcc.dg/tree-ssa/vrp78.c: New test.
From-SVN: r190169
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/vrp78.c | 34 |
2 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e41b25a..7311f7b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-08-06 Tom de Vries <tom@codesourcery.com> + + * gcc.dg/tree-ssa/vrp78.c: New test. + 2012-08-04 Sandra Loosemore <sandra@codesourcery.com> Richard Sandiford <rdsandiford@googlemail.com> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp78.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp78.c new file mode 100644 index 0000000..e08d1ff --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp78.c @@ -0,0 +1,34 @@ +/* { dg-do link } */ +/* { dg-options "-O2" } */ + +/* Based on f3 from vrp63.c, but with switch instead of if-chain. */ + +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; +} |