OSDN Git Service

Fix FreeBSD __LDBL_MAX__ -pedantic -save-temps bug.
[pf3gnuchains/gcc-fork.git] / gcc / toplev.c
index c403b11..ae564f0 100644 (file)
@@ -1,6 +1,6 @@
 /* Top level of GCC compilers (cc1, cc1plus, etc.)
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -267,9 +267,9 @@ int flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
 
 /* 0 means straightforward implementation of complex divide acceptable.
    1 means wide ranges of inputs must work for complex divide.
-   2 means C99-like requirements for complex divide (not yet implemented).  */
+   2 means C99-like requirements for complex multiply and divide.  */
 
-int flag_complex_divide_method = 0;
+int flag_complex_method = 0;
 
 /* Nonzero means that we don't want inlining by virtue of -fno-inline,
    not just because the tree inliner turned us off.  */
@@ -1043,6 +1043,9 @@ compile_file (void)
      expander can also generate them.  */
   process_pending_assemble_externals ();
 
+  /* Flush any pending equate directives.  */
+  process_pending_assemble_output_defs ();
+
   /* Attach a special .ident directive to the end of the file to identify
      the version of GCC which compiled this code.  The format of the .ident
      string is patterned after the ones produced by native SVR4 compilers.  */
@@ -1411,11 +1414,6 @@ init_asm_output (const char *name)
        fatal_error ("can%'t open %s for writing: %m", asm_file_name);
     }
 
-#ifdef IO_BUFFER_SIZE
-  setvbuf (asm_out_file, xmalloc (IO_BUFFER_SIZE),
-          _IOFBF, IO_BUFFER_SIZE);
-#endif
-
   if (!flag_syntax_only)
     {
       targetm.asm_out.file_start ();
@@ -1556,23 +1554,36 @@ default_pch_valid_p (const void *data_p, size_t len)
 static bool
 default_tree_printer (pretty_printer * pp, text_info *text)
 {
+  tree t;
+
   switch (*text->format_spec)
     {
     case 'D':
+      t = va_arg (*text->args_ptr, tree);
+      if (DECL_DEBUG_EXPR (t) && DECL_DEBUG_EXPR_IS_FROM (t))
+       t = DECL_DEBUG_EXPR (t);
+      break;
+
     case 'F':
     case 'T':
-      {
-        tree t = va_arg (*text->args_ptr, tree);
-        const char *n = DECL_NAME (t)
-          ? lang_hooks.decl_printable_name (t, 2)
-          : "<anonymous>";
-        pp_string (pp, n);
-      }
-      return true;
+      t = va_arg (*text->args_ptr, tree);
+      break;
 
     default:
       return false;
     }
+
+  if (DECL_P (t))
+    {
+      const char *n = DECL_NAME (t)
+        ? lang_hooks.decl_printable_name (t, 2)
+        : "<anonymous>";
+      pp_string (pp, n);
+    }
+  else
+    dump_generic_node (pp, t, 0, 0, 0);
+
+  return true;
 }
 
 /* Initialization of the front end environment, before command line
@@ -1943,8 +1954,6 @@ process_options (void)
 static void
 backend_init (void)
 {
-  init_adjust_machine_modes ();
-
   init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
                  || debug_info_level == DINFO_LEVEL_VERBOSE
 #ifdef VMS_DEBUGGING_INFO
@@ -1953,6 +1962,7 @@ backend_init (void)
 #endif
                    || flag_test_coverage);
 
+  init_rtlanal ();
   init_regs ();
   init_fake_stack_mems ();
   init_alias_once ();
@@ -2080,6 +2090,11 @@ do_compile (void)
   /* Don't do any more if an error has already occurred.  */
   if (!errorcount)
     {
+      /* This must be run always, because it is needed to compute the FP
+        predefined macros, such as __LDBL_MAX__, for targets using non
+        default FP formats.  */
+      init_adjust_machine_modes ();
+
       /* Set up the back-end if requested.  */
       if (!no_backend)
        backend_init ();