OSDN Git Service

* aclocal.m4: Fixed typo.
[pf3gnuchains/gcc-fork.git] / gcc / toplev.c
index bec26c1..74b43de 100644 (file)
@@ -64,6 +64,7 @@ Boston, MA 02111-1307, USA.  */
 #include "ssa.h"
 #include "params.h"
 #include "reload.h"
+#include "dwarf2asm.h"
 
 #ifdef DWARF_DEBUGGING_INFO
 #include "dwarfout.h"
@@ -1420,7 +1421,7 @@ int warn_cast_align;
    characters.  The value N is in `id_clash_len'.  */
 
 int warn_id_clash;
-int id_clash_len;
+unsigned int id_clash_len;
 
 /* Nonzero means warn about any objects definitions whose size is larger
    than N bytes.  Also want about function definitions whose returned
@@ -1611,29 +1612,6 @@ floor_log2_wide (x)
   return log;
 }
 
-/* Return the approximate positive square root of a number N.  This is for
-   statistical reports, not code generation.  */
-double
-approx_sqrt (x)
-     double x;
-{
-  double s, d;
-
-  if (x < 0)
-    abort ();
-  if (x == 0)
-    return 0;
-
-  s = x;
-  do
-    {
-      d = (s * s - x) / (2 * s);
-      s -= d;
-    }
-  while (d > .0001);
-  return s;
-}
-
 static int float_handler_set;
 int float_handled;
 jmp_buf float_handler;
@@ -2404,6 +2382,8 @@ compile_file (name)
 
   /* Output some stuff at end of file if nec.  */
 
+  dw2_output_indirect_constants ();
+
   end_final (dump_base_name);
 
   if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
@@ -2734,7 +2714,7 @@ rest_of_compilation (decl)
          }
 
       /* If requested, consider whether to make this function inline.  */
-      if ((DECL_INLINE (decl) && !flag_no_inline) 
+      if ((DECL_INLINE (decl) && !flag_no_inline)
          || flag_inline_functions)
        {
          timevar_push (TV_INTEGRATION);
@@ -3108,7 +3088,7 @@ rest_of_compilation (decl)
          timevar_pop (TV_CSE);
          cse_not_expected = !flag_rerun_cse_after_loop;
        }
-      
+
       /* If gcse or cse altered any jumps, rerun jump optimizations to clean
         things up.  Then possibly re-run CSE again.  */
       while (tem || tem2)
@@ -3721,9 +3701,19 @@ rest_of_compilation (decl)
     final_start_function (insns, asm_out_file, optimize);
     final (insns, asm_out_file, optimize, 0);
     final_end_function (insns, asm_out_file, optimize);
+
+#ifdef IA64_UNWIND_INFO
+    /* ??? The IA-64 ".handlerdata" directive must be issued before
+       the ".endp" directive that closes the procedure descriptor.  */
+    output_function_exception_table ();
+#endif
+
     assemble_end_function (decl, fnname);
 
+#ifndef IA64_UNWIND_INFO
+    /* Otherwise, it feels unclean to switch sections in the middle.  */
     output_function_exception_table ();
+#endif
 
     if (! quiet_flag)
       fflush (asm_out_file);
@@ -4105,7 +4095,7 @@ decode_f_option (arg)
   else if ((option_value = skip_leading_substring (arg, "inline-limit-"))
           || (option_value = skip_leading_substring (arg, "inline-limit=")))
     {
-      int val = 
+      int val =
        read_integral_parameter (option_value, arg - 2,
                                 MAX_INLINE_INSNS);
       set_param_value ("max-inline-insns", val);
@@ -4410,9 +4400,9 @@ independent_decode_option (argc, argv)
       arg = argv[1];
       /* Look for the `='.  */
       equal = strchr (arg, '=');
-      if (!equal) 
+      if (!equal)
        error ("invalid --param option: %s", arg);
-      else 
+      else
        {
          int val;
 
@@ -4428,7 +4418,7 @@ independent_decode_option (argc, argv)
 
       return 2;
     }
-      
+
   if (*arg == 'Y')
     arg++;
 
@@ -4595,7 +4585,7 @@ independent_decode_option (argc, argv)
    Decode command args, then call compile_file.
    Exit code is FATAL_EXIT_CODE if can't open files or if there were
    any errors, or SUCCESS_EXIT_CODE if compilation succeeded.
-   
+
    It is not safe to call this function more than once.  */
 
 int
@@ -4919,6 +4909,16 @@ toplev_main (argc, argv)
     warning ("this target machine does not have delayed branches");
 #endif
 
+  /* Some operating systems do not allow profiling without a frame
+     pointer.  */
+  if (!TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
+      && profile_flag
+      && flag_omit_frame_pointer)
+    {
+      error ("profiling does not work without a frame pointer");
+      flag_omit_frame_pointer = 0;
+    }
+    
   user_label_prefix = USER_LABEL_PREFIX;
   if (flag_leading_underscore != -1)
     {