+2011-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/49615
+ * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Fix
+ basic-block index check.
+
2011-07-04 Georg-Johann Lay <avr@gjlay.de>
* longlong.h (count_leading_zeros, count_trailing_zeros,
+2011-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/49615
+ * g++.dg/torture/pr49615.C: New testcase.
+
2011-07-03 Ira Rosen <ira.rosen@linaro.org>
PR tree-optimization/49610
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-g" } */
+
+template <class T>
+static inline bool Dispatch (T* obj, void (T::*func) ())
+{
+ (obj->*func) ();
+}
+class C
+{
+ bool f (int);
+ void g ();
+};
+bool C::f (int n)
+{
+ bool b;
+ switch (n)
+ {
+ case 0:
+ b = Dispatch (this, &C::g);
+ case 1:
+ b = Dispatch (this, &C::g);
+ }
+}
+void C::g ()
+{
+ for (;;) { }
+}
+
BB is present in the cfg. */
if (bb == NULL
|| bb->index < NUM_FIXED_BLOCKS
- || bb->index >= n_basic_blocks
+ || bb->index >= last_basic_block
|| BASIC_BLOCK (bb->index) != bb
|| !gimple_call_noreturn_p (stmt))
continue;