re PR middle-end/71476 (ICE in gimplify_switch_expr with -Wswitch-unreachable)
authorMarek Polacek <polacek@redhat.com>
Mon, 13 Jun 2016 08:57:02 +0000 (08:57 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 13 Jun 2016 08:57:02 +0000 (08:57 +0000)
commit146c55da60364def529cb3b6d6500b92c3abc75a
tree6d369fa9afe3f33198df3640c13eec0d2c04b2e2
parentf90eba2a3ca31b13d19777957214afae7c1e2647
re PR middle-end/71476 (ICE in gimplify_switch_expr with -Wswitch-unreachable)

PR middle-end/71476
* gimplify.c (maybe_warn_switch_unreachable): Factored out of
gimplify_switch_expr.
(warn_switch_unreachable_r): New function.

* c-c++-common/Wswitch-unreachable-4.c: New test.
* gcc.dg/Wswitch-unreachable-2.c: New test.
* g++.dg/tm/jump1.C: Move dg-warning.

From-SVN: r237367
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wswitch-unreachable-4.c [new file with mode: 0644]
gcc/testsuite/g++.dg/tm/jump1.C
gcc/testsuite/gcc.dg/Wswitch-unreachable-2.c [new file with mode: 0644]