===================================================================
@@ -283,7 +283,12 @@ check_process_case (tree cs)
return false;
}
- e = single_succ_edge (label_bb);
+ if (!single_succ_p (label_bb))
+ {
+ info.reason
+ = " Bad case - a non-final BB without a single successor\n";
+ return false;
+ }
following_bb = single_succ (label_bb);
}
===================================================================
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+int a;
+void try_help () __attribute__ ((__noreturn__));
+void try_help ()
+{
+}
+
+int main ()
+{
+ switch (a)
+ {
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ break;
+ default:
+ try_help ();
+ }
+}