PR middle-end/37913
* tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Only split bbs
that haven't been removed yet.
* gcc.c-torture/compile/pr37913.c: New test.
From-SVN: r141426
+2008-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/37913
+ * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Only split bbs
+ that haven't been removed yet.
+
2008-10-29 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.c (struct machine_function): New member
+2008-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/37913
+ * gcc.c-torture/compile/pr37913.c: New test.
+
2008-10-28 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/37663
--- /dev/null
+/* PR middle-end/37913 */
+
+void foo (void) __attribute__ ((noreturn));
+
+static int __attribute__ ((noreturn))
+bar (void)
+{
+ foo ();
+}
+
+void
+baz (void)
+{
+ int i = bar ();
+}
{
stmt = VEC_pop (gimple, MODIFIED_NORETURN_CALLS (cfun));
bb = gimple_bb (stmt);
+ /* BB might be deleted at this point, so verify first
+ BB is present in the cfg. */
if (bb == NULL
+ || bb->index < NUM_FIXED_BLOCKS
+ || bb->index >= n_basic_blocks
+ || BASIC_BLOCK (bb->index) != bb
|| last_stmt (bb) == stmt
|| !gimple_call_noreturn_p (stmt))
continue;