+2004-04-14  Andreas Tobler  <a.tobler@schweiz.ch>
+
+       * bb-reorder.c (fix_crossing_conditional_branches): Adjust the
+       previous fix to check HAVE_return at runtime too.
+
 2004-04-14  Nick Clifton  <nickc@redhat.com>
 
        * config/arm/arm.c (arm_override_options): If the user has not
 
 #include "fibheap.h"
 #include "target.h"
 #include "function.h"
+#include "tm_p.h"
 #include "obstack.h"
 #include "expr.h"
 #include "regs.h"
    the .o file there will be an extra round.*/
 #define N_ROUNDS 5
 
+/* Stubs in case we don't have a return insn.
+   We have to check at runtime too, not only compiletime.  */  
+
+#ifndef HAVE_return
+#define HAVE_return 0
+#define gen_return() NULL_RTX
+#endif
+
+
 /* Branch thresholds in thousandths (per mille) of the REG_BR_PROB_BASE.  */
 static int branch_threshold[N_ROUNDS] = {400, 200, 100, 0, 0};
 
                                                       (old_label), 
                                                       BB_END (new_bb));
                    }
-#ifdef HAVE_return
-                 else if (GET_CODE (old_label) == RETURN)
+                 else if (HAVE_return
+                          && GET_CODE (old_label) == RETURN)
                    new_jump = emit_jump_insn_after (gen_return (), 
                                                     BB_END (new_bb));
-#endif
                  else
                    abort ();