re PR tree-optimization/78819 (Wrong code with VRP caused by register assertions...
authorMarek Polacek <polacek@redhat.com>
Fri, 16 Dec 2016 14:19:44 +0000 (14:19 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 16 Dec 2016 14:19:44 +0000 (14:19 +0000)
commit6b520e8d4a24036508ad59eadf725437d2717a84
treeee8280c2dd57fb2d8ff965d646a7cfff34eaf2be
parented2def05fefdf59e42ad6f13262e5323030e1610
re PR tree-optimization/78819 (Wrong code with VRP caused by register assertions along default switch labels)

PR tree-optimization/78819
* tree-vrp.c (find_switch_asserts): Return if the insertion limit is 0.
Don't register an assertion if the default case shares a label with
another case.

* gcc.dg/tree-ssa/vrp112.c: New test.

From-SVN: r243746
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/vrp112.c [new file with mode: 0644]
gcc/tree-vrp.c