toplev.c (set_float_handler): Make static.
[gcc.git] / gcc / toplev.c
index 07de29ba4b1bf2b745b6bf306ca5de621d03e483..576462647049689f8ed9c41477bc9adb981f57be 100644 (file)
@@ -67,6 +67,7 @@ Boston, MA 02111-1307, USA.  */
 #include "dwarf2asm.h"
 #include "integrate.h"
 #include "debug.h"
+#include "target.h"
 
 #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
 #include "dwarf2out.h"
@@ -160,6 +161,7 @@ static const char *decl_name PARAMS ((tree, int));
 
 static void float_signal PARAMS ((int)) ATTRIBUTE_NORETURN;
 static void crash_signal PARAMS ((int)) ATTRIBUTE_NORETURN;
+static void set_float_handler PARAMS ((jmp_buf));
 static void compile_file PARAMS ((const char *));
 static void display_help PARAMS ((void));
 static void display_target_options PARAMS ((void));
@@ -1678,7 +1680,7 @@ float_signal (signo)
 /* Specify where to longjmp to when a floating arithmetic error happens.
    If HANDLER is 0, it means don't handle the errors any more.  */
 
-void
+static void
 set_float_handler (handler)
      jmp_buf handler;
 {
@@ -2267,18 +2269,19 @@ compile_file (name)
     debug_hooks = &dwarf2_debug_hooks;
 #endif
 
-#ifndef ASM_OUTPUT_SECTION_NAME
-  if (flag_function_sections)
-    {
-      warning ("-ffunction-sections not supported for this target.");
-      flag_function_sections = 0;
-    }
-  if (flag_data_sections)
+  if (! targetm.have_named_sections)
     {
-      warning ("-fdata-sections not supported for this target.");
-      flag_data_sections = 0;
+      if (flag_function_sections)
+       {
+         warning ("-ffunction-sections not supported for this target.");
+         flag_function_sections = 0;
+       }
+      if (flag_data_sections)
+       {
+         warning ("-fdata-sections not supported for this target.");
+         flag_data_sections = 0;
+       }
     }
-#endif
 
   if (flag_function_sections
       && (profile_flag || profile_block_flag))
@@ -3265,6 +3268,10 @@ rest_of_compilation (decl)
       rebuild_jump_labels_after_combine
        = combine_instructions (insns, max_reg_num ());
 
+      /* Always purge dead edges, as we may eliminate an insn throwing
+         exception.  */
+      rebuild_jump_labels_after_combine |= purge_all_dead_edges ();
+
       /* Combining insns may have turned an indirect jump into a
         direct jump.  Rebuid the JUMP_LABEL fields of jumping
         instructions.  */
@@ -3275,7 +3282,6 @@ rest_of_compilation (decl)
          timevar_pop (TV_JUMP);
 
          timevar_push (TV_FLOW);
-         purge_all_dead_edges ();
          cleanup_cfg (CLEANUP_EXPENSIVE);
 
          /* Blimey.  We've got to have the CFG up to date for the call to
@@ -3473,11 +3479,13 @@ rest_of_compilation (decl)
   verify_flow_info ();
 #endif
 
+  compute_bb_for_insn (get_max_uid ());
+
   /* If optimizing, then go ahead and split insns now.  */
   if (optimize > 0)
     split_all_insns (0);
 
-  cleanup_cfg (0);
+  cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
 
   /* On some machines, the prologue and epilogue code, or parts thereof,
      can be represented as RTL.  Doing so lets us schedule insns between
@@ -3485,8 +3493,6 @@ rest_of_compilation (decl)
      scheduling to operate in the epilogue.  */
   thread_prologue_and_epilogue_insns (insns);
 
-  compute_bb_for_insn (get_max_uid ());
-
   if (optimize)
     {
       cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_CROSSJUMP);