OSDN Git Service

(notice_cc_update): Set CC_FCOMI is this is a float compare.
[pf3gnuchains/gcc-fork.git] / gcc / toplev.c
index aa8f5e1..855aaca 100644 (file)
@@ -1,5 +1,5 @@
 /* Top level of GNU C compiler
-   Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,7 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 /* This is the top level of cc1/c++.
    It parses command args, opens files, invokes the various passes
@@ -35,7 +36,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <ctype.h>
 #include <sys/stat.h>
 
-#ifndef WINNT
+#ifndef _WIN32
 #ifdef USG
 #undef FLOAT
 #include <sys/param.h>
@@ -61,6 +62,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "output.h"
 #include "bytecode.h"
 #include "bc-emit.h"
+#include "except.h"
 
 #ifdef XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"
@@ -91,6 +93,39 @@ vms_fopen (fname, type)
 #define DEFAULT_GDB_EXTENSIONS 1
 #endif
 
+/* If more than one debugging type is supported, you must define
+   PREFERRED_DEBUGGING_TYPE to choose a format in a system-dependent way. 
+
+   This is one long line cause VAXC can't handle a \-newline.  */
+#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO))
+#ifndef PREFERRED_DEBUGGING_TYPE
+You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
+#endif /* no PREFERRED_DEBUGGING_TYPE */
+#else /* Only one debugging format supported.  Define PREFERRED_DEBUGGING_TYPE
+        so the following code needn't care.  */
+#ifdef DBX_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#endif
+#ifdef SDB_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
+#endif
+#ifdef DWARF_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+#endif
+#ifdef XCOFF_DEBUGGING_INFO
+#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
+#endif
+#endif /* More than one debugger format enabled.  */
+
+/* If still not defined, must have been because no debugging formats
+   are supported.  */
+#ifndef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
+#endif
+
 extern int rtx_equal_function_value_matters;
 
 #if ! (defined (VMS) || defined (OS2))
@@ -137,9 +172,18 @@ void fancy_abort ();
 void abort ();
 #endif
 void set_target_switch ();
-static void print_switch_values ();
 static char *decl_name ();
 
+void print_version ();
+int print_single_switch ();
+void print_switch_values ();
+/* Length of line when printing switch values.  */
+#define MAX_LINE 75
+
+#ifdef __alpha
+extern char *sbrk ();
+#endif
+
 /* Name of program invoked, sans directories.  */
 
 char *progname;
@@ -196,6 +240,7 @@ int jump_opt_dump = 0;
 int cse_dump = 0;
 int loop_dump = 0;
 int cse2_dump = 0;
+int branch_prob_dump = 0;
 int flow_dump = 0;
 int combine_dump = 0;
 int sched_dump = 0;
@@ -248,9 +293,15 @@ int sorrycount = 0;
 /* Flag to output bytecode instead of native assembler */
 int output_bytecode = 0;
 
-/* Pointer to function to compute the name to use to print a declaration.  */
+/* Pointer to function to compute the name to use to print a declaration.
+   DECL is the declaration in question.
+   VERBOSITY determines what information will be printed:
+     0: DECL_NAME, demangled as necessary.
+     1: and scope information.
+     2: and any other information that might be interesting, such as function
+        parameter types in C++.  */
 
-char *(*decl_printable_name) ();
+char *(*decl_printable_name) (/* tree decl, int verbosity */);
 
 /* Pointer to function to compute rtl for a language-specific tree code.  */
 
@@ -261,11 +312,9 @@ struct rtx_def *(*lang_expand_expr) ();
 
 void (*incomplete_decl_finalize_hook) () = 0;
 
-/* Pointer to function for interim exception handling implementation.
-   This interface will change, and it is only here until a better interface
-   replaces it.  */
+/* Highest label number used at the end of reload.  */
 
-void (*interim_eh_hook)        PROTO((tree));
+int max_label_num_after_reload;
 
 /* Nonzero if generating code to do profiling.  */
 
@@ -275,6 +324,18 @@ int profile_flag = 0;
 
 int profile_block_flag;
 
+/* Nonzero if generating code to profile program flow graph arcs.  */
+
+int profile_arc_flag = 0;
+
+/* Nonzero if generating info for gcov to calculate line test coverage.  */
+
+int flag_test_coverage = 0;
+
+/* Nonzero indicates that branch taken probabilities should be calculated.  */
+
+int flag_branch_probabilities = 0;
+
 /* Nonzero for -pedantic switch: warn about anything
    that standard spec forbids.  */
 
@@ -398,6 +459,11 @@ int flag_no_function_cse = 0;
 
 int flag_omit_frame_pointer = 0;
 
+/* Nonzero means place each function into its own section on those platforms
+   which support arbitrary section names and unlimited numbers of sections.  */
+
+int flag_function_sections = 0;
+
 /* Nonzero to inhibit use of define_optimization peephole opts.  */
 
 int flag_no_peephole = 0;
@@ -405,7 +471,7 @@ int flag_no_peephole = 0;
 /* Nonzero allows GCC to violate some IEEE or ANSI rules regarding math
    operations in the interest of optimization.  For example it allows
    GCC to assume arguments to sqrt are nonnegative numbers, allowing
-   faster code for sqrt to be generated. */
+   faster code for sqrt to be generated.  */
 
 int flag_fast_math = 0;
 
@@ -441,6 +507,11 @@ int flag_keep_inline_functions;
 
 int flag_no_inline;
 
+/* Nonzero means that we should emit static const variables
+   regardless of whether or not optimization is turned on.  */
+
+int flag_keep_static_consts = 1;
+
 /* Nonzero means we should be saving declaration info into a .X file.  */
 
 int flag_gen_aux_info = 0;
@@ -457,10 +528,6 @@ int flag_shared_data;
 
 int flag_delayed_branch;
 
-/* Nonzero means to run cleanups after CALL_EXPRs.  */
-
-int flag_short_temps;
-
 /* Nonzero if we are compiling pure (sharable) code.
    Value is 1 if we are doing reasonable (i.e. simple
    offset into offset table) pic.  Value is 2 if we can
@@ -468,7 +535,13 @@ int flag_short_temps;
 
 int flag_pic;
 
-/* Nonzero means place uninitialized global data in the bss section. */
+/* Nonzero means generate extra code for exception handling and enable
+   exception handling.  */
+
+int flag_exceptions = 1;
+
+/* Nonzero means don't place uninitialized global data in common storage
+   by default.  */
 
 int flag_no_common;
 
@@ -500,9 +573,20 @@ int flag_inhibit_size_directive = 0;
 /* -fverbose-asm causes extra commentary information to be produced in
    the generated assembly code (to make it more readable).  This option
    is generally only of use to those who actually need to read the
-   generated assembly code (perhaps while debugging the compiler itself).  */
+   generated assembly code (perhaps while debugging the compiler itself).
+   -fverbose-asm is the default.  -fno-verbose-asm causes the extra information
+   to be omitted and is useful when comparing two assembler files.  */
+
+int flag_verbose_asm = 1;
+
+/* -dA causes debug commentary information to be produced in
+   the generated assembly code (to make it more readable).  This option
+   is generally only of use to those who actually need to read the
+   generated assembly code (perhaps while debugging the compiler itself).
+   Currently, this switch is only used by dwarfout.c; however, it is intended
+   to be a catchall for printing debug information in the assembler file.  */
 
-int flag_verbose_asm = 0;
+int flag_debug_asm = 0;
 
 /* -fgnu-linker specifies use of the GNU linker for initializations.
    (Or, more generally, a linker that handles initializations.)
@@ -544,6 +628,7 @@ struct { char *string; int *variable; int on_value;} f_options[] =
   {"inline-functions", &flag_inline_functions, 1},
   {"keep-inline-functions", &flag_keep_inline_functions, 1},
   {"inline", &flag_no_inline, 0},
+  {"keep-static-consts", &flag_keep_static_consts, 1},
   {"syntax-only", &flag_syntax_only, 1},
   {"shared-data", &flag_shared_data, 1},
   {"caller-saves", &flag_caller_saves, 1},
@@ -556,9 +641,16 @@ struct { char *string; int *variable; int on_value;} f_options[] =
   {"schedule-insns2", &flag_schedule_insns_after_reload, 1},
   {"pic", &flag_pic, 1},
   {"PIC", &flag_pic, 2},
+  {"exceptions", &flag_exceptions, 1},
+  {"sjlj-exceptions", &exceptions_via_longjmp, 1},
+  {"asynchronous-exceptions", &asynchronous_exceptions, 1},
+  {"profile-arcs", &profile_arc_flag, 1},
+  {"test-coverage", &flag_test_coverage, 1},
+  {"branch-probabilities", &flag_branch_probabilities, 1},
   {"fast-math", &flag_fast_math, 1},
   {"common", &flag_no_common, 0},
   {"inhibit-size-directive", &flag_inhibit_size_directive, 1},
+  {"function-sections", &flag_function_sections, 1},
   {"verbose-asm", &flag_verbose_asm, 1},
   {"gnu-linker", &flag_gnu_linker, 1},
   {"pack-struct", &flag_pack_struct, 1},
@@ -590,6 +682,10 @@ char *lang_options[] =
   "-fno-asm",
   "-fbuiltin",
   "-fno-builtin",
+  "-fhosted",
+  "-fno-hosted",
+  "-ffreestanding",
+  "-fno-freestanding",
   "-fcond-mismatch",
   "-fno-cond-mismatch",
   "-fdollars-in-identifiers",
@@ -620,6 +716,8 @@ char *lang_options[] =
   "-Wno-import",
   "-Wimplicit",
   "-Wno-implicit",
+  "-Wmain",
+  "-Wno-main",
   "-Wmissing-braces",
   "-Wno-missing-braces",
   "-Wmissing-declarations",
@@ -634,99 +732,19 @@ char *lang_options[] =
   "-Wno-pointer-arith",
   "-Wredundant-decls",
   "-Wno-redundant-decls",
+  "-Wsign-compare",
+  "-Wno-sign-compare",
   "-Wstrict-prototypes",
   "-Wno-strict-prototypes",
   "-Wtraditional",
   "-Wno-traditional",
   "-Wtrigraphs",
   "-Wno-trigraphs",
+  "-Wundef",
+  "-Wno-undef",
   "-Wwrite-strings",
   "-Wno-write-strings",
 
-  /* These are for C++.  */
-  "-+e0",                      /* gcc.c tacks the `-' on the front.  */
-  "-+e1",
-  "-+e2",
-  "-faccess-control",
-  "-fno-access-control",
-  "-fall-virtual",
-  "-fno-all-virtual",
-  "-falt-external-templates",
-  "-fno-alt-external-templates",
-  "-fansi-overloading",
-  "-fno-ansi-overloading",
-  "-fcadillac",
-  "-fno-cadillac",
-  "-fcheck-new",
-  "-fno-check-new",
-  "-fconserve-space",
-  "-fno-conserve-space",
-  "-fdefault-inline",
-  "-fno-default-inline",
-  "-frtti",
-  "-fno-rtti",
-  "-felide-constructors",
-  "-fno-elide-constructors",
-  "-fenum-int-equiv",
-  "-fno-enum-int-equiv",
-  "-fexternal-templates",
-  "-fno-external-templates",
-  "-fgc",
-  "-fno-gc",
-  "-fgnu-keywords",
-  "-fno-gnu-keywords",
-  "-fhandle-exceptions",
-  "-fno-handle-exceptions",
-  "-fhandle-signatures",
-  "-fno-handle-signatures",
-  "-fhuge-objects",
-  "-fno-huge-objects",
-  "-fimplement-inlines",
-  "-fno-implement-inlines",
-  "-fimplicit-templates",
-  "-fno-implicit-templates",
-  "-flabels-ok",
-  "-fno-labels-ok",
-  "-fmemoize-lookups",
-  "-fno-memoize-lookups",
-  "-fnonnull-objects",
-  "-fno-nonnull-objects",
-  "-foperator-names",
-  "-fno-operator-names",
-  "-frepo",
-  "-fno-repo",
-  "-fsave-memoized",
-  "-fno-save-memoized",
-  "-fshort-temps",
-  "-fno-short-temps",
-  "-fstats",
-  "-fno-stats",
-  "-fstrict-prototype",
-  "-fno-strict-prototype",
-  "-fthis-is-variable",
-  "-fno-this-is-variable",
-  "-fvtable-thunks",
-  "-fno-vtable-thunks",
-  "-fxref",
-  "-fno-xref",
-
-  "-Wreturn-type",
-  "-Wno-return-type",
-  "-Woverloaded-virtual",
-  "-Wno-overloaded-virtual",
-  "-Wtemplate-debugging",
-  "-Wno-template-debugging",
-  "-Wctor-dtor-privacy",
-  "-Wno-ctor-dtor-privacy",
-  "-Wnon-virtual-dtor",
-  "-Wno-non-virtual-dtor",
-  "-Wextern-inline",
-  "-Wno-extern-inline",
-  "-Wreorder",
-  "-Wno-reorder",
-  "-Wsynth",
-  "-Wno-synth",
-
   /* these are for obj c */
   "-lang-objc",
   "-gen-decls",
@@ -739,75 +757,7 @@ char *lang_options[] =
   "-Wprotocol",
   "-Wno-protocol",
 
-  /* THESE ARE FOR FORTRAN. */
-  "-fversion",
-  "-ff90",
-  "-fno-f90",
-  "-fautomatic",
-  "-fno-automatic",
-  "-fdollar-ok",
-  "-fno-dollar-ok",
-  "-ff2c",
-  "-fno-f2c",
-  "-ff2c-library",
-  "-fno-f2c-library",
-  "-ffree-form",
-  "-fno-free-form",
-  "-ffixed-form",
-  "-fno-fixed-form",
-  "-fpedantic",
-  "-fno-pedantic",
-  "-fvxt-not-f90",
-  "-ff90-not-vxt",
-  "-fugly",
-  "-fno-ugly",
-  "-fdebug",
-  "-fno-debug",
-  "-fintrin-case-initcap",
-  "-fintrin-case-upper",
-  "-fintrin-case-lower",
-  "-fintrin-case-any",
-  "-fmatch-case-initcap",
-  "-fmatch-case-upper",
-  "-fmatch-case-lower",
-  "-fmatch-case-any",
-  "-fsource-case-upper",
-  "-fsource-case-upper",
-  "-fsource-case-lower",
-  "-fsource-case-preserve",
-  "-fsymbol-case-initcap",
-  "-fsymbol-case-upper",
-  "-fsymbol-case-lower",
-  "-fsymbol-case-any",
-  "-fcase-strict-upper",
-  "-fcase-strict-lower",
-  "-fcase-initcap",
-  "-fcase-upper",
-  "-fcase-lower",
-  "-fcase-preserve",
-  "-fdcp-intrinsics-delete",
-  "-fdcp-intrinsics-hide",
-  "-fdcp-intrinsics-disable",
-  "-fdcp-intrinsics-enable",
-  "-ff2c-intrinsics-delete",
-  "-ff2c-intrinsics-hide",
-  "-ff2c-intrinsics-disable",
-  "-ff2c-intrinsics-enable",
-  "-ff90-intrinsics-delete",
-  "-ff90-intrinsics-hide",
-  "-ff90-intrinsics-disable",
-  "-ff90-intrinsics-enable",
-  "-fmil-intrinsics-delete",
-  "-fmil-intrinsics-hide",
-  "-fmil-intrinsics-disable",
-  "-fmil-intrinsics-enable",
-  "-fvxt-intrinsics-delete",
-  "-fvxt-intrinsics-hide",
-  "-fvxt-intrinsics-disable",
-  "-fvxt-intrinsics-enable",
-
-  /* This is for GNAT and is temporary.  */
-  "-gnat",
+#include "options.h"
   0
 };
 \f
@@ -898,6 +848,7 @@ FILE *jump_opt_dump_file;
 FILE *cse_dump_file;
 FILE *loop_dump_file;
 FILE *cse2_dump_file;
+FILE *branch_prob_dump_file;
 FILE *flow_dump_file;
 FILE *combine_dump_file;
 FILE *sched_dump_file;
@@ -917,6 +868,7 @@ int jump_time;
 int cse_time;
 int loop_time;
 int cse2_time;
+int branch_prob_time;
 int flow_time;
 int combine_time;
 int sched_time;
@@ -935,7 +887,7 @@ int dump_time;
 int
 get_run_time ()
 {
-#ifndef WINNT
+#ifndef _WIN32
 #ifdef USG
   struct tms tms;
 #else
@@ -955,12 +907,12 @@ get_run_time ()
 
   if (quiet_flag)
     return 0;
-#ifdef WINNT
+#ifdef _WIN32
   if (clock() < 0)
     return 0;
   else
     return (clock() * 1000);
-#else /* not WINNT */
+#else /* not _WIN32 */
 #ifdef USG
   times (&tms);
   return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
@@ -1025,7 +977,7 @@ pfatal_with_name (name)
 {
   fprintf (stderr, "%s: ", progname);
   perror (name);
-  exit (35);
+  exit (FATAL_EXIT_CODE);
 }
 
 void
@@ -1033,7 +985,7 @@ fatal_io_error (name)
      char *name;
 {
   fprintf (stderr, "%s: %s: I/O error\n", progname, name);
-  exit (35);
+  exit (FATAL_EXIT_CODE);
 }
 
 /* Called to give a better error message for a bad insn rather than
@@ -1081,6 +1033,8 @@ fatal_insn (message, insn)
     fflush (dbr_sched_dump_file);
   if (stack_reg_dump_file)
     fflush (stack_reg_dump_file);
+  fflush (stdout);
+  fflush (stderr);
   abort ();
 }
 
@@ -1101,21 +1055,12 @@ fatal_insn_not_found (insn)
 /* This is the default decl_printable_name function.  */
 
 static char *
-decl_name (decl, kind)
+decl_name (decl, verbosity)
      tree decl;
-     char **kind;
+     int verbosity;
 {
   return IDENTIFIER_POINTER (DECL_NAME (decl));
 }
-
-/* This is the default interim_eh_hook function.  */
-
-void
-interim_eh (finalization)
-     tree finalization;
-{
-  /* Don't do anything by default.  */
-}
 \f
 static int need_error_newline;
 
@@ -1136,11 +1081,10 @@ announce_function (decl)
 {
   if (! quiet_flag)
     {
-      char *junk;
       if (rtl_dump_and_exit)
        fprintf (stderr, "%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
       else
-       fprintf (stderr, " %s", (*decl_printable_name) (decl, &junk));
+       fprintf (stderr, " %s", (*decl_printable_name) (decl, 2));
       fflush (stderr);
       need_error_newline = 1;
       last_error_function = current_function_decl;
@@ -1168,7 +1112,7 @@ default_print_error_function (file)
        fprintf (stderr, "At top level:\n");
       else
        {
-         char *name = (*decl_printable_name) (current_function_decl, &kind);
+         char *name = (*decl_printable_name) (current_function_decl, 2);
          fprintf (stderr, "In %s `%s':\n", kind, name);
        }
 
@@ -1177,9 +1121,9 @@ default_print_error_function (file)
 }
 
 /* Called by report_error_function to print out function name.
- * Default may be overridden by language front-ends. */
+ * Default may be overridden by language front-ends.  */
 
-void (*print_error_function) PROTO((char*)) = default_print_error_function;
+void (*print_error_function) PROTO((char *)) = default_print_error_function;
 
 /* Prints out, if necessary, the name of the current function
   that caused an error.  Called from all error and warning functions.  */
@@ -1199,7 +1143,8 @@ report_error_function (file)
   (*print_error_function) (file);
 
   if (input_file_stack && input_file_stack->next != 0
-      && input_file_stack_tick != last_error_tick)
+      && input_file_stack_tick != last_error_tick
+      && file == input_filename)
     {
       fprintf (stderr, "In file included");
       for (p = input_file_stack->next; p; p = p->next)
@@ -1231,7 +1176,8 @@ vmessage (prefix, s, ap)
     HOST_WIDE_INT v1 = va_arg(ap, HOST_WIDE_INT);
     HOST_WIDE_INT v2 = va_arg(ap, HOST_WIDE_INT);
     HOST_WIDE_INT v3 = va_arg(ap, HOST_WIDE_INT);
-    fprintf (stderr, s, v1, v2, v3);
+    HOST_WIDE_INT v4 = va_arg(ap, HOST_WIDE_INT);
+    fprintf (stderr, s, v1, v2, v3, v4);
   }
 #endif
 }
@@ -1264,7 +1210,7 @@ v_message_with_decl (decl, prefix, s, ap)
      char *s;
      va_list ap;
 {
-  char *n, *p, *junk;
+  char *n, *p;
 
   fprintf (stderr, "%s:%d: ",
           DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
@@ -1300,7 +1246,7 @@ v_message_with_decl (decl, prefix, s, ap)
   if (*p == '%')               /* Print the name.  */
     {
       char *n = (DECL_NAME (decl)
-                ? (*decl_printable_name) (decl, &junk)
+                ? (*decl_printable_name) (decl, 2)
                 : "((anonymous))");
       fputs (n, stderr);
       while (*p)
@@ -1500,7 +1446,7 @@ vfatal (s, ap)
      va_list ap;
 {
   verror (s, ap);
-  exit (34);
+  exit (FATAL_EXIT_CODE);
 }
 
 void
@@ -1898,6 +1844,20 @@ xrealloc (ptr, size)
     fatal ("virtual memory exhausted");
   return result;
 }
+
+/* Same as `strdup' but report error if no memory available.  */
+
+char *
+xstrdup (s)
+     register char *s;
+{
+  register char *result = (char *) malloc (strlen (s) + 1);
+
+  if (! result)
+    fatal ("virtual memory exhausted");
+  strcpy (result, s);
+  return result;
+}
 \f
 /* Return the logarithm of X, base 2, considering X unsigned,
    if X is a power of 2.  Otherwise, returns -1.
@@ -1933,9 +1893,27 @@ floor_log2_wide (x)
   return log;
 }
 
+static int float_handler_set;
 int float_handled;
 jmp_buf float_handler;
 
+/* Signals actually come here.  */
+
+static void
+float_signal (signo)
+     /* If this is missing, some compilers complain.  */
+     int signo;
+{
+  if (float_handled == 0)
+    abort ();
+#if defined (USG) || defined (hpux)
+  signal (SIGFPE, float_signal);  /* re-enable the signal catcher */
+#endif
+  float_handled = 0;
+  signal (SIGFPE, float_signal);
+  longjmp (float_handler, 1);
+}
+
 /* Specify where to longjmp to when a floating arithmetic error happens.
    If HANDLER is 0, it means don't handle the errors any more.  */
 
@@ -1946,6 +1924,12 @@ set_float_handler (handler)
   float_handled = (handler != 0);
   if (handler)
     bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
+
+  if (float_handled && ! float_handler_set)
+    {
+      signal (SIGFPE, float_signal);
+      float_handler_set = 1;
+    }
 }
 
 /* Specify, in HANDLER, where to longjmp to when a floating arithmetic
@@ -1980,23 +1964,6 @@ pop_float_handler (handled, handler)
     bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));
 }
 
-/* Signals actually come here.  */
-
-static void
-float_signal (signo)
-     /* If this is missing, some compilers complain.  */
-     int signo;
-{
-  if (float_handled == 0)
-    abort ();
-#if defined (USG) || defined (hpux)
-  signal (SIGFPE, float_signal);  /* re-enable the signal catcher */
-#endif
-  float_handled = 0;
-  signal (SIGFPE, float_signal);
-  longjmp (float_handler, 1);
-}
-
 /* Handler for SIGPIPE.  */
 
 static void
@@ -2008,42 +1975,25 @@ pipe_closed (signo)
 }
 
 /* Strip off a legitimate source ending from the input string NAME of
-   length LEN. */
+   length LEN.  Rather than having to know the names used by all of
+   our front ends, we strip off an ending of a period followed by one,
+   two, or three characters.  */
 
 void
 strip_off_ending (name, len)
      char *name;
      int len;
 {
-  if (len > 2 && ! strcmp (".c", name + len - 2))
-    name[len - 2] = 0;
-  else if (len > 2 && ! strcmp (".m", name + len - 2))
-    name[len - 2] = 0;
-  else if (len > 2 && ! strcmp (".i", name + len - 2))
-    name[len - 2] = 0;
-  else if (len > 3 && ! strcmp (".ii", name + len - 3))
-    name[len - 3] = 0;
-  else if (len > 3 && ! strcmp (".co", name + len - 3))
-    name[len - 3] = 0;
-  else if (len > 3 && ! strcmp (".cc", name + len - 3))
-    name[len - 3] = 0;
-  else if (len > 2 && ! strcmp (".C", name + len - 2))
-    name[len - 2] = 0;
-  else if (len > 4 && ! strcmp (".cxx", name + len - 4))
-    name[len - 4] = 0;
-  else if (len > 4 && ! strcmp (".cpp", name + len - 4))
-    name[len - 4] = 0;
-  else if (len > 2 && ! strcmp (".f", name + len - 2))
-    name[len - 2] = 0;
-  /* Ada will use extensions like .ada, .adb, and .ads, so just test
-     for "ad".  */
-  else if (len > 4 && ! strncmp (".ad", name + len - 4, 3))
-    name[len - 4] = 0;
-  else if (len > 4 && ! strcmp (".atr", name + len - 4))
-    name[len - 4] = 0;
+  if (len > 2 && name[len - 2] == '.')
+    name[len - 2] = '\0';
+  else if (len > 3 && name[len - 3] == '.')
+    name[len - 3] = '\0';
+  else if (len > 4 && name[len - 4] == '.')
+    name[len - 4] = '\0';
 }
 
 /* Output a quoted string.  */
+
 void
 output_quoted_string (asm_file, string)
      FILE *asm_file;
@@ -2092,7 +2042,8 @@ output_file_directive (asm_file, input_name)
 #endif
 }
 \f
-/* Routine to build language identifier for object file. */
+/* Routine to build language identifier for object file.  */
+
 static void
 output_lang_identify (asm_out_file)
      FILE *asm_out_file;
@@ -2104,6 +2055,7 @@ output_lang_identify (asm_out_file)
 }
 
 /* Routine to open a dump file.  */
+
 static FILE *
 open_dump_file (base_name, suffix)
      char *base_name;
@@ -2142,6 +2094,7 @@ compile_file (name)
   cse_time = 0;
   loop_time = 0;
   cse2_time = 0;
+  branch_prob_time = 0;
   flow_time = 0;
   combine_time = 0;
   sched_time = 0;
@@ -2180,7 +2133,8 @@ compile_file (name)
      but the options would have to be parsed first to know that. -bson */
   init_rtl ();
   init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
-                 || debug_info_level == DINFO_LEVEL_VERBOSE);
+                 || debug_info_level == DINFO_LEVEL_VERBOSE
+                 || flag_test_coverage);
   init_regs ();
   init_decl_processing ();
   init_optabs ();
@@ -2223,6 +2177,10 @@ compile_file (name)
   if (cse2_dump)
     cse2_dump_file = open_dump_file (dump_base_name, ".cse2");
 
+  /* If branch_prob dump desired, open the output file.  */
+  if (branch_prob_dump)
+    branch_prob_dump_file = open_dump_file (dump_base_name, ".bp");
+
   /* If flow dump desired, open the output file.  */
   if (flow_dump)
     flow_dump_file = open_dump_file (dump_base_name, ".flow");
@@ -2312,10 +2270,23 @@ compile_file (name)
   if (!output_bytecode)
     {
       ASM_FILE_START (asm_out_file);
+
+#ifdef ASM_COMMENT_START
+      if (flag_verbose_asm)
+       {
+         /* Print the list of options in effect.  */
+         print_version (asm_out_file, ASM_COMMENT_START);
+         print_switch_values (asm_out_file, 0, MAX_LINE,
+                              ASM_COMMENT_START, " ", "\n");
+         /* Add a blank line here so it appears in assembler output but not
+            screen output.  */
+         fprintf (asm_out_file, "\n");
+       }
+#endif
     }
 
   /* Output something to inform GDB that this compilation was by GCC.  Also
-     serves to tell GDB file consists of bytecodes. */
+     serves to tell GDB file consists of bytecodes.  */
   if (output_bytecode)
     fprintf (asm_out_file, "bc_gcc2_compiled.:\n");
   else
@@ -2327,11 +2298,29 @@ compile_file (name)
 #endif
     }
 
-  /* Output something to identify which front-end produced this file. */
+  /* Output something to identify which front-end produced this file.  */
 #ifdef ASM_IDENTIFY_LANGUAGE
   ASM_IDENTIFY_LANGUAGE (asm_out_file);
 #endif
 
+#ifndef ASM_OUTPUT_SECTION_NAME
+  if (flag_function_sections)
+    {
+      warning ("-ffunction-sections not supported for this target.");
+      flag_function_sections = 0;
+    }
+#endif
+
+  if (flag_function_sections
+      && (profile_flag || profile_block_flag))
+    {
+      warning ("-ffunction-sections disabled; it makes profiling impossible.");
+      flag_function_sections = 0;
+    }
+
+  if (flag_function_sections && write_symbols != NO_DEBUG)
+    warning ("-ffunction-sections may affect debugging on some targets.");
+
   if (output_bytecode)
     {
       if (profile_flag || profile_block_flag)
@@ -2371,11 +2360,16 @@ compile_file (name)
   if (write_symbols == DWARF_DEBUG)
     TIMEVAR (symout_time, dwarfout_init (asm_out_file, main_input_filename));
 #endif
+#ifdef DWARF2_DEBUGGING_INFO
+  if (write_symbols == DWARF2_DEBUG)
+    TIMEVAR (symout_time, dwarf2out_init (asm_out_file, main_input_filename));
+#endif
 
   /* Initialize yet another pass.  */
 
   if (!output_bytecode)
     init_final (main_input_filename);
+  init_branch_prob (dump_base_name);
 
   start_time = get_run_time ();
 
@@ -2393,6 +2387,8 @@ compile_file (name)
        poplevel (0, 0, 0);
     }
 
+  output_func_start_profiler ();
+
   /* Compilation is now finished except for writing
      what's left of the symbol table output.  */
 
@@ -2447,7 +2443,8 @@ compile_file (name)
 
            /* Don't write out static consts, unless we still need them.
 
-              We also keep static consts if not optimizing (for debugging).
+              We also keep static consts if not optimizing (for debugging),
+              unless the user specified -fno-keep-static-consts.
               ??? They might be better written into the debug information.
               This is possible when using DWARF.
 
@@ -2467,12 +2464,12 @@ compile_file (name)
 
               ??? A tempting alternative (for both C and C++) would be
               to force a constant to be written if and only if it is
-              defined in a main file, as opposed to an include file. */
+              defined in a main file, as opposed to an include file.  */
 
            if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
                && (! TREE_READONLY (decl)
                    || TREE_PUBLIC (decl)
-                   || !optimize
+                   || (!optimize && flag_keep_static_consts)
                    || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
              {
                reconsider = 1;
@@ -2493,6 +2490,12 @@ compile_file (name)
          }
       }
 
+    /* Now that all possible functions have been output, we can dump
+       the exception table.  */
+
+    if (exception_table_p ())
+      output_exception_table ();
+
     for (i = 0; i < len; i++)
       {
        decl = vec[i];
@@ -2514,6 +2517,7 @@ compile_file (name)
                || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
            && DECL_INITIAL (decl) == 0
            && DECL_EXTERNAL (decl)
+           && ! DECL_ARTIFICIAL (decl)
            && ! TREE_PUBLIC (decl))
          {
            pedwarn_with_decl (decl, 
@@ -2533,7 +2537,7 @@ compile_file (name)
            && ! DECL_EXTERNAL (decl)
            && ! TREE_PUBLIC (decl)
            && ! TREE_USED (decl)
-           && ! DECL_REGISTER (decl)
+           && (TREE_CODE (decl) == FUNCTION_DECL || ! DECL_REGISTER (decl))
            /* The TREE_USED bit for file-scope decls
               is kept in the identifier, to handle multiple
               external decls in different scopes.  */
@@ -2552,7 +2556,7 @@ compile_file (name)
          TIMEVAR (symout_time, sdbout_symbol (decl, 0));
 
        /* Output COFF information for non-global
-          file-scope initialized variables. */
+          file-scope initialized variables.  */
        if (write_symbols == SDB_DEBUG
            && TREE_CODE (decl) == VAR_DECL
            && DECL_INITIAL (decl)
@@ -2571,6 +2575,16 @@ compile_file (name)
            && (TREE_CODE (decl) != FUNCTION_DECL || !DECL_INITIAL (decl)))
          TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 1));
 #endif
+#ifdef DWARF2_DEBUGGING_INFO
+       /* Output DWARF2 information for file-scope tentative data object
+          declarations, file-scope (extern) function declarations (which
+          had no corresponding body) and file-scope tagged type declarations
+          and definitions which have not yet been forced out.  */
+
+       if (write_symbols == DWARF2_DEBUG
+           && (TREE_CODE (decl) != FUNCTION_DECL || !DECL_INITIAL (decl)))
+         TIMEVAR (symout_time, dwarf2out_decl (decl));
+#endif
       }
   }
 
@@ -2595,11 +2609,20 @@ compile_file (name)
             });
 #endif
 
+#ifdef DWARF2_DEBUGGING_INFO
+  if (write_symbols == DWARF2_DEBUG)
+    TIMEVAR (symout_time,
+            {
+              dwarf2out_finish ();
+            });
+#endif
+
   /* Output some stuff at end of file if nec.  */
 
   if (!output_bytecode)
     {
-      end_final (main_input_filename);
+      end_final (dump_base_name);
+      end_branch_prob (branch_prob_dump_file);
 
 #ifdef ASM_FILE_END
       ASM_FILE_END (asm_out_file);
@@ -2637,6 +2660,9 @@ compile_file (name)
   if (cse2_dump)
     fclose (cse2_dump_file);
 
+  if (branch_prob_dump)
+    fclose (branch_prob_dump_file);
+
   if (flow_dump)
     fclose (flow_dump_file);
 
@@ -2691,6 +2717,7 @@ compile_file (name)
          print_time ("cse", cse_time);
          print_time ("loop", loop_time);
          print_time ("cse2", cse2_time);
+         print_time ("branch-prob", branch_prob_time);
          print_time ("flow", flow_time);
          print_time ("combine", combine_time);
          print_time ("sched", sched_time);
@@ -2755,7 +2782,8 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end)
                        && (DECL_INITIAL (decl) == 0
                            || DECL_INITIAL (decl) == error_mark_node)))
                   assemble_variable (decl, top_level, at_end, 0);
-              if (decl == last_assemble_variable_decl)
+              if (!output_bytecode
+                  && decl == last_assemble_variable_decl)
                 {
                   ASM_FINISH_DECLARE_OBJECT (asm_out_file, decl,
                                              top_level, at_end);
@@ -2829,21 +2857,18 @@ rest_of_compilation (decl)
 
   if (DECL_SAVED_INSNS (decl) == 0)
     {
-      int specd = DECL_INLINE (decl);
+      int inlineable = 0;
       char *lose;
 
       /* If requested, consider whether to make this function inline.  */
-      if (specd || flag_inline_functions)
+      if (DECL_INLINE (decl) || flag_inline_functions)
        TIMEVAR (integration_time,
                 {
                   lose = function_cannot_inline_p (decl);
-                  /* If not optimzing, then make sure the DECL_INLINE
-                     bit is off.  */
                   if (lose || ! optimize)
                     {
-                      if (warn_inline && specd)
+                      if (warn_inline && DECL_INLINE (decl))
                         warning_with_decl (decl, lose);
-                      DECL_INLINE (decl) = 0;
                       DECL_ABSTRACT_ORIGIN (decl) = 0;
                       /* Don't really compile an extern inline function.
                          If we can't make it inline, pretend
@@ -2855,7 +2880,11 @@ rest_of_compilation (decl)
                         }
                     }
                   else
-                    DECL_INLINE (decl) = 1;
+                    /* ??? Note that this has the effect of making it look
+                       like "inline" was specified for a function if we choose
+                       to inline it.  This isn't quite right, but it's
+                       probably not worth the trouble to fix.  */
+                    inlineable = DECL_INLINE (decl) = 1;
                 });
 
       insns = get_insns ();
@@ -2877,13 +2906,16 @@ rest_of_compilation (decl)
         compile it by itself, defer decision till end of compilation.
         finish_compilation will call rest_of_compilation again
         for those functions that need to be output.  Also defer those
-        functions that we are supposed to defer.  */
-
-      if (DECL_DEFER_OUTPUT (decl)
-         || ((specd || DECL_INLINE (decl))
-             && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
-                  && ! flag_keep_inline_functions)
-                 || DECL_EXTERNAL (decl))))
+        functions that we are supposed to defer.  We cannot defer
+        functions containing nested functions since the nested function
+        data is in our non-saved obstack.  */
+
+      if (! current_function_contains_functions
+         && (DECL_DEFER_OUTPUT (decl)
+             || (DECL_INLINE (decl)
+                 && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
+                      && ! flag_keep_inline_functions)
+                     || DECL_EXTERNAL (decl)))))
        {
          DECL_DEFER_OUTPUT (decl) = 1;
 
@@ -2901,14 +2933,26 @@ rest_of_compilation (decl)
                  set_decl_abstract_flags (decl, 0);
                }
 #endif
+#ifdef DWARF2_DEBUGGING_INFO
+             /* Generate the DWARF2 info for the "abstract" instance
+                of a function which we may later generate inlined and/or
+                out-of-line instances of.  */
+             if (write_symbols == DWARF2_DEBUG)
+               {
+                 set_decl_abstract_flags (decl, 1);
+                 TIMEVAR (symout_time, dwarf2out_decl (decl));
+                 set_decl_abstract_flags (decl, 0);
+               }
+#endif
              TIMEVAR (integration_time, save_for_inline_nocopy (decl));
+             RTX_INTEGRATED_P (DECL_SAVED_INSNS (decl)) = inlineable;
              goto exit_rest_of_compilation;
            }
        }
 
       /* If we have to compile the function now, save its rtl and subdecls
         so that its compilation will not affect what others get.  */
-      if (DECL_INLINE (decl) || DECL_DEFER_OUTPUT (decl))
+      if (inlineable || DECL_DEFER_OUTPUT (decl))
        {
 #ifdef DWARF_DEBUGGING_INFO
          /* Generate the DWARF info for the "abstract" instance of
@@ -2922,14 +2966,27 @@ rest_of_compilation (decl)
              set_decl_abstract_flags (decl, 0);
            }
 #endif
+#ifdef DWARF2_DEBUGGING_INFO
+         /* Generate the DWARF2 info for the "abstract" instance of
+            a function which we will generate an out-of-line instance
+            of almost immediately (and which we may also later generate
+            various inlined instances of).  */
+         if (write_symbols == DWARF2_DEBUG)
+           {
+             set_decl_abstract_flags (decl, 1);
+             TIMEVAR (symout_time, dwarf2out_decl (decl));
+             set_decl_abstract_flags (decl, 0);
+           }
+#endif
          saved_block_tree = DECL_INITIAL (decl);
          saved_arguments = DECL_ARGUMENTS (decl);
          TIMEVAR (integration_time, save_for_inline_copying (decl));
+         RTX_INTEGRATED_P (DECL_SAVED_INSNS (decl)) = inlineable;
        }
 
       /* If specified extern inline but we aren't inlining it, we are
         done.  */
-      if (specd && DECL_EXTERNAL (decl))
+      if (DECL_INLINE (decl) && DECL_EXTERNAL (decl))
        goto exit_rest_of_compilation;
     }
 
@@ -2947,12 +3004,9 @@ rest_of_compilation (decl)
       goto exit_rest_of_compilation;
     }
 
-  /* From now on, allocate rtl in current_obstack, not in saveable_obstack.
-     Note that that may have been done above, in save_for_inline_copying.
-     The call to resume_temporary_allocation near the end of this function
-     goes back to the usual state of affairs.  */
-
-  rtl_in_current_obstack ();
+  /* Add an unwinder for exception handling, if needed.
+     This must be done before we finalize PIC code.  */
+  emit_unwinder ();
 
 #ifdef FINALIZE_PIC
   /* If we are doing position-independent code generation, now
@@ -2963,6 +3017,15 @@ rest_of_compilation (decl)
     FINALIZE_PIC;
 #endif
 
+  /* From now on, allocate rtl in current_obstack, not in saveable_obstack.
+     Note that that may have been done above, in save_for_inline_copying.
+     The call to resume_temporary_allocation near the end of this function
+     goes back to the usual state of affairs.  This must be done after
+     we've built up any unwinders for exception handling, and done
+     the FINALIZE_PIC work, if necessary.  */
+
+  rtl_in_current_obstack ();
+
   insns = get_insns ();
 
   /* Copy any shared structure that should not be shared.  */
@@ -2978,17 +3041,14 @@ rest_of_compilation (decl)
      for all references to such slots.  */
 /*   fixup_stack_slots (); */
 
-  /* Do jump optimization the first time, if -opt.
-     Also do it if -W, but in that case it doesn't change the rtl code,
-     it only computes whether control can drop off the end of the function.  */
+  /* Find all the EH handlers.  */
+  find_exception_handler_labels ();
 
-  if (optimize > 0 || extra_warnings || warn_return_type
-      /* If function is `noreturn', we should warn if it tries to return.  */
-      || TREE_THIS_VOLATILE (decl))
-    {
-      TIMEVAR (jump_time, reg_scan (insns, max_reg_num (), 0));
-      TIMEVAR (jump_time, jump_optimize (insns, 0, 0, 1));
-    }
+  /* Always do one jump optimization pass to ensure that JUMP_LABEL fields
+     are initialized and to compute whether control can drop off the end
+     of the function.  */
+  TIMEVAR (jump_time, reg_scan (insns, max_reg_num (), 0));
+  TIMEVAR (jump_time, jump_optimize (insns, 0, 0, 1));
 
   /* Now is when we stop if -fsyntax-only and -Wreturn-type.  */
   if (rtl_dump_and_exit || flag_syntax_only || DECL_DEFER_OUTPUT (decl))
@@ -3093,10 +3153,12 @@ rest_of_compilation (decl)
     }
 
   if (optimize > 0 && flag_thread_jumps)
-    /* This pass of jump threading straightens out code
-       that was kinked by loop optimization.  */
-    TIMEVAR (jump_time, thread_jumps (insns, max_reg_num (), 0));
-
+    {
+      /* This pass of jump threading straightens out code
+         that was kinked by loop optimization.  */
+      TIMEVAR (jump_time, reg_scan (insns, max_reg_num (), 0));
+      TIMEVAR (jump_time, thread_jumps (insns, max_reg_num (), 0));
+    }
   /* Dump rtl code after cse, if we are doing that.  */
 
   if (cse2_dump)
@@ -3106,6 +3168,25 @@ rest_of_compilation (decl)
               fflush (cse2_dump_file);
             });
 
+  if (branch_prob_dump)
+    TIMEVAR (dump_time,
+            {
+              fprintf (branch_prob_dump_file, "\n;; Function %s\n\n",
+                       IDENTIFIER_POINTER (DECL_NAME (decl)));
+            });
+
+  if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
+    TIMEVAR (branch_prob_time,
+            {
+              branch_prob (insns, branch_prob_dump_file);
+            });
+
+  if (branch_prob_dump)
+    TIMEVAR (dump_time,
+            {
+              print_rtl (branch_prob_dump_file, insns);
+              fflush (branch_prob_dump_file);
+            });
   /* We are no longer anticipating cse in this function, at least.  */
 
   cse_not_expected = 1;
@@ -3233,6 +3314,10 @@ rest_of_compilation (decl)
             fprintf (global_reg_dump_file, "\n;; Function %s\n\n",
                      IDENTIFIER_POINTER (DECL_NAME (decl))));
 
+  /* Save the last label number used so far, so reorg can tell
+     when it's safe to kill spill regs.  */
+  max_label_num_after_reload = max_label_num ();
+
   /* Unless we did stupid register allocation,
      allocate remaining pseudo-regs, then do the reload pass
      fixing up any insns that are invalid.  */
@@ -3322,7 +3407,7 @@ rest_of_compilation (decl)
 #endif
 
   /* If a scheduling pass for delayed branches is to be done,
-     call the scheduling code. */
+     call the scheduling code.  */
 
 #ifdef DELAY_SLOTS
   if (optimize > 0 && flag_delayed_branch)
@@ -3341,12 +3426,11 @@ rest_of_compilation (decl)
     }
 #endif
 
-  if (optimize > 0)
-    /* Shorten branches.  */
-    TIMEVAR (shorten_branch_time,
-            {
-              shorten_branches (get_insns ());
-            });
+  /* Shorten branches.  */
+  TIMEVAR (shorten_branch_time,
+          {
+            shorten_branches (get_insns ());
+          });
 
 #ifdef STACK_REGS
   TIMEVAR (stack_reg_time, reg_to_stack (insns, stack_reg_dump_file));
@@ -3409,6 +3493,11 @@ rest_of_compilation (decl)
     TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
 #endif
 
+#ifdef DWARF2_DEBUGGING_INFO
+  if (write_symbols == DWARF2_DEBUG)
+    TIMEVAR (symout_time, dwarf2out_decl (decl));
+#endif
+
  exit_rest_of_compilation:
 
   /* In case the function was not output,
@@ -3425,12 +3514,17 @@ rest_of_compilation (decl)
      the copy, but the original is unchanged.  */
 
   if (saved_block_tree != 0)
-    DECL_INITIAL (decl) = saved_block_tree;
-  if (saved_arguments != 0)
-    DECL_ARGUMENTS (decl) = saved_arguments;
+    {
+      DECL_INITIAL (decl) = saved_block_tree;
+      DECL_ARGUMENTS (decl) = saved_arguments;
+      DECL_ABSTRACT_ORIGIN (decl) = NULL_TREE;
+    }
 
   reload_completed = 0;
 
+  /* Clear out the insn_length contents now that they are no longer valid.  */
+  init_insn_lengths ();
+
   /* Clear out the real_constant_chain before some of the rtx's
      it runs through become garbage.  */
 
@@ -3440,6 +3534,10 @@ rest_of_compilation (decl)
 
   resume_temporary_allocation ();
 
+  /* Show no temporary slots allocated.  */
+
+  init_temp_slots ();
+
   /* The parsing time is all the time spent in yyparse
      *except* what is spent in this function.  */
 
@@ -3480,7 +3578,7 @@ main (argc, argv, envp)
   {
     struct rlimit rlim;
 
-    /* Set the stack limit huge so that alloca does not fail. */
+    /* Set the stack limit huge so that alloca does not fail.  */
     getrlimit (RLIMIT_STACK, &rlim);
     rlim.rlim_cur = rlim.rlim_max;
     setrlimit (RLIMIT_STACK, &rlim);
@@ -3495,7 +3593,6 @@ main (argc, argv, envp)
 
   decl_printable_name = decl_name;
   lang_expand_expr = (struct rtx_def *(*)()) do_abort;
-  interim_eh_hook = interim_eh;
 
   /* Initialize whether `char' is signed.  */
   flag_signed_char = DEFAULT_SIGNED_CHAR;
@@ -3527,11 +3624,6 @@ main (argc, argv, envp)
     }
 
   obey_regdecls = (optimize == 0);
-  if (optimize == 0)
-    {
-      flag_no_inline = 1;
-      warn_inline = 0;
-    }
 
   if (optimize >= 1)
     {
@@ -3565,6 +3657,11 @@ main (argc, argv, envp)
       flag_inline_functions = 1;
     }
 
+  /* Initialize target_flags before OPTIMIZATION_OPTIONS so the latter can
+     modify it.  */
+  target_flags = 0;
+  set_target_switch ("");
+
 #ifdef OPTIMIZATION_OPTIONS
   /* Allow default optimizations to be specified on a per-machine basis.  */
   OPTIMIZATION_OPTIONS (optimize);
@@ -3573,9 +3670,6 @@ main (argc, argv, envp)
   /* Initialize register usage now so switches may override.  */
   init_reg_sets ();
 
-  target_flags = 0;
-  set_target_switch ("");
-
   for (i = 1; i < argc; i++)
     {
       int j;
@@ -3608,6 +3702,7 @@ main (argc, argv, envp)
                switch (*p++)
                  {
                  case 'a':
+                   branch_prob_dump = 1;
                    combine_dump = 1;
                    dbr_sched_dump = 1;
                    flow_dump = 1;
@@ -3622,6 +3717,9 @@ main (argc, argv, envp)
                    sched2_dump = 1;
                    stack_reg_dump = 1;
                    break;
+                 case 'b':
+                   branch_prob_dump = 1;
+                   break;
                  case 'k':
                    stack_reg_dump = 1;
                    break;
@@ -3673,10 +3771,12 @@ main (argc, argv, envp)
                  case 'y':
                    set_yydebug (1);
                    break;
-
                  case 'x':
                    rtl_dump_and_exit = 1;
                    break;
+                 case 'A':
+                   flag_debug_asm = 1;
+                   break;
                  }
            }
          else if (str[0] == 'f')
@@ -3818,145 +3918,142 @@ main (argc, argv, envp)
            }
          else if (!strcmp (str, "p"))
            {
-             if (!output_bytecode)
-               profile_flag = 1;
-             else
-               error ("profiling not supported in bytecode compilation");
+             profile_flag = 1;
            }
          else if (!strcmp (str, "a"))
            {
 #if !defined (BLOCK_PROFILER) || !defined (FUNCTION_BLOCK_PROFILER)
              warning ("`-a' option (basic block profile) not supported");
 #else
-             profile_block_flag = 1;
+              profile_block_flag = (profile_block_flag < 2) ? 1 : 3;
+#endif
+           }
+         else if (!strcmp (str, "ax"))
+           {
+#if !defined (FUNCTION_BLOCK_PROFILER_EXIT) || !defined (BLOCK_PROFILER) || !defined (FUNCTION_BLOCK_PROFILER)
+             warning ("`-ax' option (jump profiling) not supported");
+#else
+             profile_block_flag = (!profile_block_flag 
+                                      || profile_block_flag == 2) ? 2 : 3;
 #endif
            }
          else if (str[0] == 'g')
            {
-             char *p = str + 1;
-             char *q;
              unsigned len;
              unsigned level;
-
-             while (*p && (*p < '0' || *p > '9'))
-               p++;
-             len = p - str;
-             q = p;
-             while (*q && (*q >= '0' && *q <= '9'))
-               q++;
-             if (*p)
-               level = atoi (p);
-             else
-               level = 2;      /* default debugging info level */
-             if (*q || level > 3)
-               {
-                 warning ("invalid debug level specification in option: `-%s'",
-                          str);
-                 warning ("no debugging information will be generated");
-                 level = 0;
-               }
-
-             /* If more than one debugging type is supported,
-                you must define PREFERRED_DEBUGGING_TYPE
-                to choose a format in a system-dependent way.  */
-             /* This is one long line cause VAXC can't handle a \-newline.  */
-#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO))
-#ifdef PREFERRED_DEBUGGING_TYPE
-             if (!strncmp (str, "ggdb", len))
-               write_symbols = PREFERRED_DEBUGGING_TYPE;
-#else /* no PREFERRED_DEBUGGING_TYPE */
-You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
-#endif /* no PREFERRED_DEBUGGING_TYPE */
-#endif /* More than one debugger format enabled.  */
+             /* A lot of code assumes write_symbols == NO_DEBUG if the
+                debugging level is 0 (thus -gstabs1 -gstabs0 would lose track
+                of what debugging type has been selected).  This records the
+                selected type.  It is an error to specify more than one
+                debugging type.  */
+             static enum debug_info_type selected_debug_type = NO_DEBUG;
+             /* Non-zero if debugging format has been explicitly set.
+                -g and -ggdb don't explicitly set the debugging format so
+                -gdwarf -g3 is equivalent to -gdwarf3.  */
+             static int type_explicitly_set_p = 0;
+             /* Table of supported debugging formats.  */
+             static struct {
+               char *arg;
+               /* Since PREFERRED_DEBUGGING_TYPE isn't necessarily a
+                  constant expression, we use NO_DEBUG in its place.  */
+               enum debug_info_type debug_type;
+               int use_extensions_p;
+             } *da, debug_args[] = {
+               { "g", NO_DEBUG, DEFAULT_GDB_EXTENSIONS },
+               { "ggdb", NO_DEBUG, 1 },
 #ifdef DBX_DEBUGGING_INFO
-             if (write_symbols != NO_DEBUG)
-               ;
-             else if (!strncmp (str, "ggdb", len))
-               write_symbols = DBX_DEBUG;
-             else if (!strncmp (str, "gstabs", len))
-               write_symbols = DBX_DEBUG;
-             else if (!strncmp (str, "gstabs+", len))
-               write_symbols = DBX_DEBUG;
-
-             /* Always enable extensions for -ggdb or -gstabs+, 
-                always disable for -gstabs.
-                For plain -g, use system-specific default.  */
-             if (write_symbols == DBX_DEBUG && !strncmp (str, "ggdb", len)
-                 && len >= 2)
-               use_gnu_debug_info_extensions = 1;
-             else if (write_symbols == DBX_DEBUG && !strncmp (str, "gstabs+", len)
-                      && len >= 7)
-               use_gnu_debug_info_extensions = 1;
-             else if (write_symbols == DBX_DEBUG
-                      && !strncmp (str, "gstabs", len) && len >= 2)
-               use_gnu_debug_info_extensions = 0;
-             else
-               use_gnu_debug_info_extensions = DEFAULT_GDB_EXTENSIONS;
-#endif /* DBX_DEBUGGING_INFO */
+               { "gstabs", DBX_DEBUG, 0 },
+               { "gstabs+", DBX_DEBUG, 1 },
+#endif
 #ifdef DWARF_DEBUGGING_INFO
-             if (write_symbols != NO_DEBUG)
-               ;
-             else if (!strncmp (str, "g", len))
-               write_symbols = DWARF_DEBUG;
-             else if (!strncmp (str, "ggdb", len))
-               write_symbols = DWARF_DEBUG;
-             else if (!strncmp (str, "gdwarf", len))
-               write_symbols = DWARF_DEBUG;
-
-             /* Always enable extensions for -ggdb or -gdwarf+, 
-                always disable for -gdwarf.
-                For plain -g, use system-specific default.  */
-             if (write_symbols == DWARF_DEBUG && !strncmp (str, "ggdb", len)
-                 && len >= 2)
-               use_gnu_debug_info_extensions = 1;
-             else if (write_symbols == DWARF_DEBUG && !strcmp (str, "gdwarf+"))
-               use_gnu_debug_info_extensions = 1;
-             else if (write_symbols == DWARF_DEBUG
-                      && !strncmp (str, "gdwarf", len) && len >= 2)
-               use_gnu_debug_info_extensions = 0;
-             else
-               use_gnu_debug_info_extensions = DEFAULT_GDB_EXTENSIONS;
+               { "gdwarf", DWARF_DEBUG, 0 },
+               { "gdwarf+", DWARF_DEBUG, 1 },
+#endif
+#ifdef DWARF2_DEBUGGING_INFO
+               { "gdwarf-2", DWARF2_DEBUG, 0 },
 #endif
-#ifdef SDB_DEBUGGING_INFO
-             if (write_symbols != NO_DEBUG)
-               ;
-             else if (!strncmp (str, "g", len))
-               write_symbols = SDB_DEBUG;
-             else if (!strncmp (str, "gdb", len))
-               write_symbols = SDB_DEBUG;
-             else if (!strncmp (str, "gcoff", len))
-               write_symbols = SDB_DEBUG;
-#endif /* SDB_DEBUGGING_INFO */
 #ifdef XCOFF_DEBUGGING_INFO
-             if (write_symbols != NO_DEBUG)
-               ;
-             else if (!strncmp (str, "g", len))
-               write_symbols = XCOFF_DEBUG;
-             else if (!strncmp (str, "ggdb", len))
-               write_symbols = XCOFF_DEBUG;
-             else if (!strncmp (str, "gxcoff", len))
-               write_symbols = XCOFF_DEBUG;
-
-             /* Always enable extensions for -ggdb or -gxcoff+,
-                always disable for -gxcoff.
-                For plain -g, use system-specific default.  */
-             if (write_symbols == XCOFF_DEBUG && !strncmp (str, "ggdb", len)
-                 && len >= 2)
-               use_gnu_debug_info_extensions = 1;
-             else if (write_symbols == XCOFF_DEBUG && !strcmp (str, "gxcoff+"))
-               use_gnu_debug_info_extensions = 1;
-             else if (write_symbols == XCOFF_DEBUG
-                      && !strncmp (str, "gxcoff", len) && len >= 2)
-               use_gnu_debug_info_extensions = 0;
-             else
-               use_gnu_debug_info_extensions = DEFAULT_GDB_EXTENSIONS;
-#endif       
-             if (write_symbols == NO_DEBUG)
-               warning ("`-%s' option not supported on this version of GCC", str);
-             else if (level == 0)
-               write_symbols = NO_DEBUG;
-             else
-               debug_info_level = (enum debug_info_level) level;
+               { "gxcoff", XCOFF_DEBUG, 0 },
+               { "gxcoff+", XCOFF_DEBUG, 1 },
+#endif
+#ifdef SDB_DEBUGGING_INFO
+               { "gcoff", SDB_DEBUG, 0 },
+#endif
+               { 0, 0, 0 }
+             };
+             /* Indexed by enum debug_info_type.  */
+             static char *debug_type_names[] = {
+               "none", "stabs", "coff", "dwarf-1", "dwarf-2", "xcoff"
+             };
+
+             /* Look up STR in the table.  */
+             for (da = debug_args; da->arg; da++)
+               {
+                 if (! strncmp (str, da->arg, strlen (da->arg)))
+                   {
+                     enum debug_info_type type = da->debug_type;
+                     char *p, *q;
+
+                     p = str + strlen (da->arg);
+                     if (*p && (*p < '0' || *p > '9'))
+                       continue;
+                     q = p;
+                     while (*q && (*q >= '0' && *q <= '9'))
+                       q++;
+                     if (*p)
+                       level = atoi (p);
+                     else
+                       level = 2;      /* default debugging info level */
+                     if (*q || level > 3)
+                       {
+                         warning ("invalid debug level specification in option: `-%s'",
+                                  str);
+                         /* ??? This error message is incorrect in the case of
+                            -g4 -g.  */
+                         warning ("no debugging information will be generated");
+                         level = 0;
+                       }
+
+                     /* ??? A few targets use STR in the
+                        definition of PREFERRED_DEBUGGING_TYPE!  */
+                     if (type == NO_DEBUG)
+                       type = PREFERRED_DEBUGGING_TYPE;
+
+                     if (type == NO_DEBUG)
+                       warning ("`-%s' not supported by this configuration of GCC",
+                                str);
+
+                     /* Does it conflict with an already selected type?  */
+                     if (type_explicitly_set_p
+                         /* -g/-ggdb don't conflict with anything */
+                         && da->debug_type != NO_DEBUG
+                         && type != selected_debug_type)
+                       warning ("`-%s' ignored, conflicts with `-g%s'",
+                                str, debug_type_names[(int) selected_debug_type]);
+                     else
+                       {
+                         /* If the format has already been set, -g/-ggdb
+                            only change the debug level.  */
+                         if (type_explicitly_set_p
+                             && da->debug_type == NO_DEBUG)
+                           ; /* don't change debugging type */
+                         else
+                           {
+                             selected_debug_type = type;
+                             type_explicitly_set_p = da->debug_type != NO_DEBUG;
+                           }
+                         write_symbols = (level == 0
+                                          ? NO_DEBUG
+                                          : selected_debug_type);
+                         use_gnu_debug_info_extensions = da->use_extensions_p;
+                         debug_info_level = (enum debug_info_level) level;
+                       }
+                     break;
+                   }
+               }
+             if (! da->arg)
+               warning ("`-%s' not supported by this configuration of GCC",
+                        str);
            }
          else if (!strcmp (str, "o"))
            {
@@ -3982,12 +4079,12 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
     }
 
   /* Initialize for bytecode output.  A good idea to do this as soon as
-     possible after the "-f" options have been parsed. */
+     possible after the "-f" options have been parsed.  */
   if (output_bytecode)
     {
 #ifndef TARGET_SUPPORTS_BYTECODE
       /* Just die with a fatal error if not supported */
-      fatal ("-fbytecode not supporter for this target");
+      fatal ("-fbytecode not supported for this target");
 #else
       bc_initialize ();
 #endif
@@ -4007,20 +4104,17 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
        warning ("-Wuninitialized is not supported without -O");
     }
 
-#if defined(DWARF_DEBUGGING_INFO)
-  if (write_symbols == DWARF_DEBUG
-      && strcmp (language_string, "GNU C++") == 0)
-    {
-      warning ("-g option not supported for C++ on SVR4 systems");
-      write_symbols = NO_DEBUG;
-    }
-#endif /* defined(DWARF_DEBUGGING_INFO) */
-
 #ifdef OVERRIDE_OPTIONS
   /* Some machines may reject certain combinations of options.  */
   OVERRIDE_OPTIONS;
 #endif
 
+  if (profile_block_flag == 3)
+    {
+      warning ("`-ax' and `-a' are conflicting options. `-a' ignored.");
+      profile_block_flag = 2;
+    }
+
   /* Unrolling all loops implies that standard loop unrolling must also
      be done.  */
   if (flag_unroll_all_loops)
@@ -4049,30 +4143,16 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
      option flags in use.  */
   if (version_flag)
     {
-      fprintf (stderr, "%s version %s", language_string, version_string);
-#ifdef TARGET_VERSION
-      TARGET_VERSION;
-#endif
-#ifdef __GNUC__
-#ifndef __VERSION__
-#define __VERSION__ "[unknown]"
-#endif
-      fprintf (stderr, " compiled by GNU C version %s.\n", __VERSION__);
-#else
-      fprintf (stderr, " compiled by CC.\n");
-#endif
+      print_version (stderr, "");
       if (! quiet_flag)
-       print_switch_values ();
+       print_switch_values (stderr, 0, MAX_LINE, "", " ", "\n");
     }
 
   compile_file (filename);
 
-#if !defined(OS2) && !defined(VMS) && !defined(WINNT)
+#if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN32__))
   if (flag_print_mem)
     {
-#ifdef __alpha
-      char *sbrk ();
-#endif
       char *lim = (char *) sbrk (0);
 
       fprintf (stderr, "Data size %d.\n",
@@ -4085,14 +4165,14 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
       system ("ps v");
 #endif /* not USG */
     }
-#endif /* not OS2 and not VMS and not WINNT */
+#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN32) */
 
   if (errorcount)
     exit (FATAL_EXIT_CODE);
   if (sorrycount)
     exit (FATAL_EXIT_CODE);
   exit (SUCCESS_EXIT_CODE);
-  return 34;
+  return 0;
 }
 \f
 /* Decode -m switches.  */
@@ -4149,51 +4229,230 @@ set_target_switch (name)
     error ("Invalid option `%s'", name);
 }
 \f
-/* Variable used for communication between the following two routines.  */
+/* Print version information to FILE.
+   Each line begins with INDENT (for the case where FILE is the
+   assembler output file).  */
 
-static int line_position;
+void
+print_version (file, indent)
+     FILE *file;
+     char *indent;
+{
+  fprintf (file, "%s%s%s version %s", indent, *indent != 0 ? " " : "",
+          language_string, version_string);
+  fprintf (file, " (%s)", TARGET_NAME);
+#ifdef __GNUC__
+#ifndef __VERSION__
+#define __VERSION__ "[unknown]"
+#endif
+  fprintf (file, " compiled by GNU C version %s.\n", __VERSION__);
+#else
+  fprintf (file, " compiled by CC.\n");
+#endif
+}
 
-/* Print an option value and adjust the position in the line.  */
+/* Print an option value and return the adjusted position in the line.
+   ??? We don't handle error returns from fprintf (disk full); presumably
+   other code will catch a disk full though.  */
 
-static void
-print_single_switch (type, name)
-     char *type, *name;
+int
+print_single_switch (file, pos, max, indent, sep, term, type, name)
+     FILE *file;
+     int pos, max;
+     char *indent, *sep, *term, *type, *name;
 {
-  fprintf (stderr, " %s%s", type, name);
-
-  line_position += strlen (type) + strlen (name) + 1;
+  /* The ultrix fprintf returns 0 on success, so compute the result we want
+     here since we need it for the following test.  */
+  int len = strlen (sep) + strlen (type) + strlen (name);
 
-  if (line_position > 65)
+  if (pos != 0
+      && pos + len > max)
+    {
+      fprintf (file, "%s", term);
+      pos = 0;
+    }
+  if (pos == 0)
     {
-      fprintf (stderr, "\n\t");
-      line_position = 8;
+      fprintf (file, "%s", indent);
+      pos = strlen (indent);
     }
+  fprintf (file, "%s%s%s", sep, type, name);
+  pos += len;
+  return pos;
 }
      
-/* Print default target switches for -version.  */
+/* Print active target switches to FILE.
+   POS is the current cursor position and MAX is the size of a "line".
+   Each line begins with INDENT and ends with TERM.
+   Each switch is separated from the next by SEP.  */
 
-static void
-print_switch_values ()
+void
+print_switch_values (file, pos, max, indent, sep, term)
+     FILE *file;
+     int pos, max;
+     char *indent, *sep, *term;
 {
-  register int j;
+  int j, flags;
+  char **p;
+
+  /* Print the options as passed.  */
+
+  pos = print_single_switch (file, pos, max, indent, *indent ? " " : "", term,
+                            "options passed: ", "");
 
-  fprintf (stderr, "enabled:");
-  line_position = 8;
+  for (p = &save_argv[1]; *p != NULL; p++)
+    if (**p == '-')
+      {
+       /* Ignore these.  */
+       if (strcmp (*p, "-o") == 0)
+         {
+           if (p[1] != NULL)
+             p++;
+           continue;
+         }
+       if (strcmp (*p, "-quiet") == 0)
+         continue;
+       if (strcmp (*p, "-version") == 0)
+         continue;
+       if ((*p)[1] == 'd')
+         continue;
+
+       pos = print_single_switch (file, pos, max, indent, sep, term, *p, "");
+      }
+  if (pos > 0)
+    fprintf (file, "%s", term);
+
+  /* Print the -f and -m options that have been enabled.
+     We don't handle language specific options but printing argv
+     should suffice.  */
+
+  pos = print_single_switch (file, 0, max, indent, *indent ? " " : "", term,
+                            "options enabled: ", "");
 
   for (j = 0; j < sizeof f_options / sizeof f_options[0]; j++)
     if (*f_options[j].variable == f_options[j].on_value)
-      print_single_switch ("-f", f_options[j].string);
+      pos = print_single_switch (file, pos, max, indent, sep, term,
+                                "-f", f_options[j].string);
 
-  for (j = 0; j < sizeof W_options / sizeof W_options[0]; j++)
-    if (*W_options[j].variable == W_options[j].on_value)
-      print_single_switch ("-W", W_options[j].string);
+  /* Print target specific options.  */
 
+  flags = target_flags;
   for (j = 0; j < sizeof target_switches / sizeof target_switches[0]; j++)
     if (target_switches[j].name[0] != '\0'
        && target_switches[j].value > 0
        && ((target_switches[j].value & target_flags)
            == target_switches[j].value))
-      print_single_switch ("-m", target_switches[j].name);
+      {
+       pos = print_single_switch (file, pos, max, indent, sep, term,
+                                  "-m", target_switches[j].name);
+       flags &= ~ target_switches[j].value;
+      }
 
-  fprintf (stderr, "\n");
+#ifdef TARGET_OPTIONS
+  for (j = 0; j < sizeof target_options / sizeof target_options[0]; j++)
+    if (*target_options[j].variable != NULL)
+      {
+       char prefix[256];
+       sprintf (prefix, "-m%s", target_options[j].prefix);
+       pos = print_single_switch (file, pos, max, indent, sep, term,
+                                  prefix, *target_options[j].variable);
+      }
+#endif
+
+  fprintf (file, "%s", term);
+}
+
+/* Record the beginning of a new source file, named FILENAME.  */
+
+void
+debug_start_source_file (filename)
+     register char *filename;
+{
+#ifdef DBX_DEBUGGING_INFO
+  if (write_symbols == DBX_DEBUG)
+    dbxout_start_new_source_file (filename);
+#endif
+#ifdef DWARF_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF_DEBUG)
+    dwarfout_start_new_source_file (filename);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF2_DEBUG)
+    dwarf2out_start_source_file (filename);
+#endif /* DWARF2_DEBUGGING_INFO */  
+#ifdef SDB_DEBUGGING_INFO
+  if (write_symbols == SDB_DEBUG)
+    sdbout_start_new_source_file (filename);
+#endif
+}
+
+/* Record the resumption of a source file.  LINENO is the line number in
+   the source file we are returning to.  */
+
+void
+debug_end_source_file (lineno)
+     register unsigned lineno;
+{
+#ifdef DBX_DEBUGGING_INFO
+  if (write_symbols == DBX_DEBUG)
+    dbxout_resume_previous_source_file ();
+#endif
+#ifdef DWARF_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF_DEBUG)
+    dwarfout_resume_previous_source_file (lineno);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF2_DEBUG)
+    dwarf2out_end_source_file ();
+#endif /* DWARF2_DEBUGGING_INFO */
+#ifdef SDB_DEBUGGING_INFO
+  if (write_symbols == SDB_DEBUG)
+    sdbout_resume_previous_source_file ();
+#endif
+}
+
+/* Called from check_newline in c-parse.y.  The `buffer' parameter contains
+   the tail part of the directive line, i.e. the part which is past the
+   initial whitespace, #, whitespace, directive-name, whitespace part.  */
+
+void
+debug_define (lineno, buffer)
+     register unsigned lineno;
+     register char *buffer;
+{
+#ifdef DWARF_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF_DEBUG)
+    dwarfout_define (lineno, buffer);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF2_DEBUG)
+    dwarf2out_define (lineno, buffer);
+#endif /* DWARF2_DEBUGGING_INFO */
+}
+
+/* Called from check_newline in c-parse.y.  The `buffer' parameter contains
+   the tail part of the directive line, i.e. the part which is past the
+   initial whitespace, #, whitespace, directive-name, whitespace part.  */
+
+void
+debug_undef (lineno, buffer)
+     register unsigned lineno;
+     register char *buffer;
+{
+#ifdef DWARF_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF_DEBUG)
+    dwarfout_undef (lineno, buffer);
+#endif /* DWARF_DEBUGGING_INFO */
+#ifdef DWARF2_DEBUGGING_INFO
+  if (debug_info_level == DINFO_LEVEL_VERBOSE
+      && write_symbols == DWARF2_DEBUG)
+    dwarf2out_undef (lineno, buffer);
+#endif /* DWARF2_DEBUGGING_INFO */
 }