OSDN Git Service

* tree.h (init_function_start): Remove filename and line paramters.
[pf3gnuchains/gcc-fork.git] / gcc / f / com.c
index cc3af7e..aec7ce3 100644 (file)
@@ -1,5 +1,5 @@
 /* com.c -- Implementation File (module.c template V1.0)
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by James Craig Burley.
 
@@ -168,7 +168,7 @@ tree ffecom_tree_type[FFEINFO_basictype][FFEINFO_kindtype];
    appropriate _tree_type array element.  */
 
 static GTY(()) tree ffecom_tree_fun_type[FFEINFO_basictype][FFEINFO_kindtype];
-static GTY(()) tree 
+static GTY(()) tree
   ffecom_tree_ptr_to_fun_type[FFEINFO_basictype][FFEINFO_kindtype];
 static GTY(()) tree ffecom_tree_subr_type;
 static GTY(()) tree ffecom_tree_ptr_to_subr_type;
@@ -389,7 +389,6 @@ static tree start_decl (tree decl, bool is_top_level);
 static void start_function (tree name, tree type, int nested, int public);
 static void ffecom_file_ (const char *name);
 static void ffecom_close_include_ (FILE *f);
-static int ffecom_decode_include_option_ (char *spec);
 static FILE *ffecom_open_include_ (char *name, ffewhereLine l,
                                   ffewhereColumn c);
 
@@ -604,18 +603,18 @@ struct lang_identifier GTY(())
   (((struct lang_identifier *)(NODE))->invented)
 
 /* The resulting tree type.  */
-union lang_tree_node 
+union lang_tree_node
   GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
        chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
 {
-  union tree_node GTY ((tag ("0"), 
-                       desc ("tree_node_structure (&%h)"))) 
+  union tree_node GTY ((tag ("0"),
+                       desc ("tree_node_structure (&%h)")))
     generic;
   struct lang_identifier GTY ((tag ("1"))) identifier;
 };
 
 /* Fortran doesn't use either of these.  */
-struct lang_decl GTY(()) 
+struct lang_decl GTY(())
 {
 };
 struct lang_type GTY(())
@@ -791,7 +790,7 @@ ffecom_subscript_check_ (tree array, tree element, int dim, int total_dims,
                     arg3);
 
     arg4 = convert (ffecom_f2c_ftnint_type_node,
-                   build_int_2 (lineno, 0));
+                   build_int_2 (input_line, 0));
 
     arg1 = build_tree_list (NULL_TREE, arg1);
     arg2 = build_tree_list (NULL_TREE, arg2);
@@ -806,6 +805,7 @@ ffecom_subscript_check_ (tree array, tree element, int dim, int total_dims,
   die = ffecom_call_gfrt (FFECOM_gfrtRANGE,
                          args, NULL_TREE);
   TREE_SIDE_EFFECTS (die) = 1;
+  die = convert (void_type_node, die);
 
   element = ffecom_3 (COND_EXPR,
                      TREE_TYPE (element),
@@ -1108,8 +1108,7 @@ ffecom_convert_to_complex_ (tree type, tree expr)
 /* Like gcc's convert(), but crashes if widening might happen.  */
 
 static tree
-ffecom_convert_narrow_ (type, expr)
-     tree type, expr;
+ffecom_convert_narrow_ (tree type, tree expr)
 {
   register tree e = expr;
   register enum tree_code code = TREE_CODE (type);
@@ -1179,8 +1178,7 @@ ffecom_convert_narrow_ (type, expr)
 /* Like gcc's convert(), but crashes if narrowing might happen.  */
 
 static tree
-ffecom_convert_widen_ (type, expr)
-     tree type, expr;
+ffecom_convert_widen_ (tree type, tree expr)
 {
   register tree e = expr;
   register enum tree_code code = TREE_CODE (type);
@@ -1288,7 +1286,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart)
     {
       bothparts = build_tree_list (TYPE_FIELDS (type), realpart);
       TREE_CHAIN (bothparts) = build_tree_list (TREE_CHAIN (TYPE_FIELDS (type)), imagpart);
-      bothparts = build (CONSTRUCTOR, type, NULL_TREE, bothparts);
+      bothparts = build_constructor (type, bothparts);
     }
   else
     {
@@ -2583,12 +2581,12 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
                                   CHARACTER. */
   bool cmplxfunc;              /* Use f2c way of returning COMPLEX. */
   bool multi;                  /* Master fn has multiple return types. */
-  bool altreturning = FALSE;   /* This entry point has alternate returns. */
-  int old_lineno = lineno;
-  const char *old_input_filename = input_filename;
+  bool altreturning = FALSE;   /* This entry point has alternate
+                                  returns. */
+  location_t old_loc = input_location;
 
   input_filename = ffesymbol_where_filename (fn);
-  lineno = ffesymbol_where_filelinenum (fn);
+  input_line = ffesymbol_where_filelinenum (fn);
 
   ffecom_doing_entry_ = TRUE;  /* Don't bother with array dimensions. */
 
@@ -2918,8 +2916,7 @@ ffecom_do_entry_ (ffesymbol fn, int entrynum)
 
   finish_function (0);
 
-  lineno = old_lineno;
-  input_filename = old_input_filename;
+  input_location = old_loc;
 
   ffecom_doing_entry_ = FALSE;
 }
@@ -3028,7 +3025,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
           build_range_type (ffecom_integer_type_node,
                             ffecom_integer_zero_node,
                             item));
-      list = build (CONSTRUCTOR, item, NULL_TREE, list);
+      list = build_constructor (item, list);
       TREE_CONSTANT (list) = 1;
       TREE_STATIC (list) = 1;
       return list;
@@ -3076,7 +3073,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
           build_range_type (ffecom_integer_type_node,
                             ffecom_integer_zero_node,
                             item));
-      list = build (CONSTRUCTOR, item, NULL_TREE, list);
+      list = build_constructor (item, list);
       TREE_CONSTANT (list) = 1;
       TREE_STATIC (list) = 1;
       return list;
@@ -6049,11 +6046,7 @@ ffecom_get_external_identifier_ (ffesymbol s)
 
   if (!ffe_is_underscoring ()
       || (strcmp (name, FFETARGET_nameBLANK_COMMON) == 0)
-#if FFETARGET_isENFORCED_MAIN_NAME
-      || (strcmp (name, FFETARGET_nameENFORCED_NAME) == 0)
-#else
       || (strcmp (name, FFETARGET_nameUNNAMED_MAIN) == 0)
-#endif
       || (strcmp (name, FFETARGET_nameUNNAMED_BLOCK_DATA) == 0))
     return get_identifier (name);
 
@@ -6111,8 +6104,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
   tree result;
   bool charfunc = (bt == FFEINFO_basictypeCHARACTER);
   static bool recurse = FALSE;
-  int old_lineno = lineno;
-  const char *old_input_filename = input_filename;
+  location_t old_loc = input_location;
 
   ffecom_nested_entry_ = s;
 
@@ -6125,7 +6117,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
      see how it works at this point.  */
 
   input_filename = ffesymbol_where_filename (s);
-  lineno = ffesymbol_where_filelinenum (s);
+  input_line = ffesymbol_where_filelinenum (s);
 
   /* Pretransform the expression so any newly discovered things belong to the
      outer program unit, not to the statement function. */
@@ -6222,8 +6214,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
 
   recurse = FALSE;
 
-  lineno = old_lineno;
-  input_filename = old_input_filename;
+  input_location = old_loc;
 
   ffecom_nested_entry_ = NULL;
 
@@ -6303,7 +6294,7 @@ ffecom_init_zero_ (tree decl)
     init = convert (type, integer_zero_node);
   else if (!incremental)
     {
-      init = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE);
+      init = build_constructor (type, NULL_TREE);
       TREE_CONSTANT (init) = 1;
       TREE_STATIC (init) = 1;
     }
@@ -7081,14 +7072,13 @@ ffecom_start_progunit_ ()
   && (ffecom_primary_entry_kind_ == FFEINFO_kindFUNCTION)
   && (ffecom_master_bt_ == FFEINFO_basictypeNONE);
   bool main_program = FALSE;
-  int old_lineno = lineno;
-  const char *old_input_filename = input_filename;
+  location_t old_loc = input_location;
 
   assert (fn != NULL);
   assert (ffesymbol_hook (fn).decl_tree == NULL_TREE);
 
   input_filename = ffesymbol_where_filename (fn);
-  lineno = ffesymbol_where_filelinenum (fn);
+  input_line = ffesymbol_where_filelinenum (fn);
 
   switch (ffecom_primary_entry_kind_)
     {
@@ -7270,8 +7260,7 @@ ffecom_start_progunit_ ()
   /* Disallow temp vars at this level.  */
   current_binding_level->prep_state = 2;
 
-  lineno = old_lineno;
-  input_filename = old_input_filename;
+  input_location = old_loc;
 
   /* This handles any symbols still untransformed, in case -g specified.
      This used to be done in ffecom_finish_progunit, but it turns out to
@@ -7299,8 +7288,7 @@ ffecom_sym_transform_ (ffesymbol s)
   ffeinfoBasictype bt;
   ffeinfoKindtype kt;
   ffeglobal g;
-  int old_lineno = lineno;
-  const char *old_input_filename = input_filename;
+  location_t old_loc = input_location;
 
   /* Must ensure special ASSIGN variables are declared at top of outermost
      block, else they'll end up in the innermost block when their first
@@ -7319,14 +7307,14 @@ ffecom_sym_transform_ (ffesymbol s)
   if (ffesymbol_sfdummyparent (s) == NULL)
     {
       input_filename = ffesymbol_where_filename (s);
-      lineno = ffesymbol_where_filelinenum (s);
+      input_line = ffesymbol_where_filelinenum (s);
     }
   else
     {
       ffesymbol sf = ffesymbol_sfdummyparent (s);
 
       input_filename = ffesymbol_where_filename (sf);
-      lineno = ffesymbol_where_filelinenum (sf);
+      input_line = ffesymbol_where_filelinenum (sf);
     }
 
   bt = ffeinfo_basictype (ffebld_info (s));
@@ -7415,16 +7403,16 @@ ffecom_sym_transform_ (ffesymbol s)
            ffestorag st = ffesymbol_storage (s);
            tree type;
 
-           if ((st != NULL)
-               && (ffestorag_size (st) == 0))
+           type = ffecom_type_localvar_ (s, bt, kt);
+
+           if (type == error_mark_node)
              {
                t = error_mark_node;
                break;
              }
 
-           type = ffecom_type_localvar_ (s, bt, kt);
-
-           if (type == error_mark_node)
+           if ((st != NULL)
+               && (ffestorag_size (st) == 0))
              {
                t = error_mark_node;
                break;
@@ -7444,7 +7432,7 @@ ffecom_sym_transform_ (ffesymbol s)
                assert (et != NULL_TREE);
 
                if (! TREE_STATIC (et))
-                 put_var_into_stack (et);
+                 put_var_into_stack (et, /*rescan=*/true);
 
                offset = ffestorag_modulo (est)
                  + ffestorag_offset (ffesymbol_storage (s))
@@ -8090,8 +8078,8 @@ ffecom_sym_transform_ (ffesymbol s)
          DECL_EXTERNAL (t) = 1;
          TREE_PUBLIC (t) = 1;
 
-         t = start_decl (t, FALSE);
-         finish_decl (t, NULL_TREE, FALSE);
+         t = start_decl (t, TRUE);
+         finish_decl (t, NULL_TREE, TRUE);
 
          if ((g != NULL)
              && ((ffeglobal_type (g) == FFEGLOBAL_typeSUBR)
@@ -8295,8 +8283,7 @@ ffecom_sym_transform_ (ffesymbol s)
   ffesymbol_hook (s).length_tree = tlen;
   ffesymbol_hook (s).addr = addr;
 
-  lineno = old_lineno;
-  input_filename = old_input_filename;
+  input_location = old_loc;
 
   return s;
 }
@@ -8313,20 +8300,19 @@ static ffesymbol
 ffecom_sym_transform_assign_ (ffesymbol s)
 {
   tree t;                      /* Transformed thingy. */
-  int old_lineno = lineno;
-  const char *old_input_filename = input_filename;
+  location_t old_loc = input_location;
 
   if (ffesymbol_sfdummyparent (s) == NULL)
     {
       input_filename = ffesymbol_where_filename (s);
-      lineno = ffesymbol_where_filelinenum (s);
+      input_line = ffesymbol_where_filelinenum (s);
     }
   else
     {
       ffesymbol sf = ffesymbol_sfdummyparent (s);
 
       input_filename = ffesymbol_where_filename (sf);
-      lineno = ffesymbol_where_filelinenum (sf);
+      input_line = ffesymbol_where_filelinenum (sf);
     }
 
   assert (!ffecom_transform_only_dummies_);
@@ -8376,8 +8362,7 @@ ffecom_sym_transform_assign_ (ffesymbol s)
 
   ffesymbol_hook (s).assign_tree = t;
 
-  lineno = old_lineno;
-  input_filename = old_input_filename;
+  input_location = old_loc;
 
   return s;
 }
@@ -8762,7 +8747,7 @@ ffecom_transform_namelist_ (ffesymbol s)
   TREE_CHAIN (TREE_CHAIN (nmlinits))
     = build_tree_list ((field = TREE_CHAIN (field)), nvarsinit);
 
-  nmlinits = build (CONSTRUCTOR, nmltype, NULL_TREE, nmlinits);
+  nmlinits = build_constructor (nmltype, nmlinits);
   TREE_CONSTANT (nmlinits) = 1;
   TREE_STATIC (nmlinits) = 1;
 
@@ -9297,7 +9282,7 @@ ffecom_vardesc_ (ffebld expr)
       TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (varinits)))
        = build_tree_list ((field = TREE_CHAIN (field)), typeinit);
 
-      varinits = build (CONSTRUCTOR, vardesctype, NULL_TREE, varinits);
+      varinits = build_constructor (vardesctype, varinits);
       TREE_CONSTANT (varinits) = 1;
       TREE_STATIC (varinits) = 1;
 
@@ -9342,7 +9327,7 @@ ffecom_vardesc_array_ (ffesymbol s)
                           build_range_type (integer_type_node,
                                             integer_one_node,
                                             build_int_2 (i, 0)));
-  list = build (CONSTRUCTOR, item, NULL_TREE, list);
+  list = build_constructor (item, list);
   TREE_CONSTANT (list) = 1;
   TREE_STATIC (list) = 1;
 
@@ -9448,7 +9433,7 @@ ffecom_vardesc_dims_ (ffesymbol s)
                                               build_int_2
                                               ((int) ffesymbol_rank (s)
                                                + 2, 0)));
-    list = build (CONSTRUCTOR, item, NULL_TREE, numdim);
+    list = build_constructor (item, numdim);
     TREE_CONSTANT (list) = 1;
     TREE_STATIC (list) = 1;
 
@@ -9583,7 +9568,7 @@ ffecom_2 (enum tree_code code, tree type, tree node1,
     case COMPLEX_EXPR:
       item = build_tree_list (TYPE_FIELDS (type), node1);
       TREE_CHAIN (item) = build_tree_list (TREE_CHAIN (TYPE_FIELDS (type)), node2);
-      item = build (CONSTRUCTOR, type, NULL_TREE, item);
+      item = build_constructor (type, item);
       break;
 
     case PLUS_EXPR:
@@ -10121,9 +10106,6 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
     case FFEBLD_opPERCENT_DESCR:
       switch (ffeinfo_basictype (ffebld_info (expr)))
        {
-#ifdef PASS_HOLLERITH_BY_DESCRIPTOR
-       case FFEINFO_basictypeHOLLERITH:
-#endif
        case FFEINFO_basictypeCHARACTER:
          break;                /* Passed by descriptor anyway. */
 
@@ -10139,21 +10121,6 @@ ffecom_arg_ptr_to_expr (ffebld expr, tree *length)
       break;
     }
 
-#ifdef PASS_HOLLERITH_BY_DESCRIPTOR
-  if ((ffeinfo_basictype (ffebld_info (expr)) == FFEINFO_basictypeHOLLERITH)
-      && (length != NULL))
-    {                          /* Pass Hollerith by descriptor. */
-      ffetargetHollerith h;
-
-      assert (ffebld_op (expr) == FFEBLD_opCONTER);
-      h = ffebld_cu_val_hollerith (ffebld_constant_union
-                                  (ffebld_conter (expr)));
-      *length
-       = build_int_2 (h.length, 0);
-      TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node;
-    }
-#endif
-
   if (ffeinfo_basictype (ffebld_info (expr)) != FFEINFO_basictypeCHARACTER)
     return ffecom_ptr_to_expr (expr);
 
@@ -10335,31 +10302,43 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
     {
     case FFEINFO_basictypeINTEGER:
       {
-       int val;
+        HOST_WIDE_INT hi, lo;
 
        switch (kt)
          {
 #if FFETARGET_okINTEGER1
          case FFEINFO_kindtypeINTEGER1:
-           val = ffebld_cu_val_integer1 (*cu);
+           lo = ffebld_cu_val_integer1 (*cu);
+           hi = (lo < 0) ? -1 : 0;
            break;
 #endif
 
 #if FFETARGET_okINTEGER2
          case FFEINFO_kindtypeINTEGER2:
-           val = ffebld_cu_val_integer2 (*cu);
+           lo = ffebld_cu_val_integer2 (*cu);
+           hi = (lo < 0) ? -1 : 0;
            break;
 #endif
 
 #if FFETARGET_okINTEGER3
          case FFEINFO_kindtypeINTEGER3:
-           val = ffebld_cu_val_integer3 (*cu);
+           lo = ffebld_cu_val_integer3 (*cu);
+           hi = (lo < 0) ? -1 : 0;
            break;
 #endif
 
 #if FFETARGET_okINTEGER4
          case FFEINFO_kindtypeINTEGER4:
-           val = ffebld_cu_val_integer4 (*cu);
+#if HOST_BITS_PER_LONGLONG > HOST_BITS_PER_WIDE_INT
+           {
+             long long int big = ffebld_cu_val_integer4 (*cu);
+             hi = (HOST_WIDE_INT) (big >> HOST_BITS_PER_WIDE_INT);
+             lo = (HOST_WIDE_INT) big;
+           }
+#else
+           lo = ffebld_cu_val_integer4 (*cu);
+           hi = (lo < 0) ? -1 : 0;
+#endif
            break;
 #endif
 
@@ -10369,7 +10348,7 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
          case FFEINFO_kindtypeANY:
            return error_mark_node;
          }
-       item = build_int_2 (val, (val < 0) ? -1 : 0);
+       item = build_int_2 (lo, hi);
        TREE_TYPE (item) = tree_type;
       }
       break;
@@ -10439,12 +10418,6 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
            break;
 #endif
 
-#if FFETARGET_okREAL4
-         case FFEINFO_kindtypeREAL4:
-           val = ffetarget_value_real4 (ffebld_cu_val_real4 (*cu));
-           break;
-#endif
-
          default:
            assert ("bad REAL constant kind type" == NULL);
            /* Fall through. */
@@ -10484,13 +10457,6 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
            break;
 #endif
 
-#if FFETARGET_okCOMPLEX4
-         case FFEINFO_kindtypeREAL4:
-           real = ffetarget_value_real4 (ffebld_cu_val_complex4 (*cu).real);
-           imag = ffetarget_value_real4 (ffebld_cu_val_complex4 (*cu).imaginary);
-           break;
-#endif
-
          default:
            assert ("bad REAL constant kind type" == NULL);
            /* Fall through. */
@@ -10592,6 +10558,87 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
   return item;
 }
 
+/* Transform constant-union to tree, with the type known.  */
+
+tree
+ffecom_constantunion_with_type (ffebldConstantUnion *cu,
+                     tree tree_type, ffebldConst ct)
+{
+  tree item;
+
+  int val;
+
+  switch (ct)
+  {
+#if FFETARGET_okINTEGER1
+         case  FFEBLD_constINTEGER1:
+         val = ffebld_cu_val_integer1 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+#if FFETARGET_okINTEGER2
+         case  FFEBLD_constINTEGER2:
+                 val = ffebld_cu_val_integer2 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+#if FFETARGET_okINTEGER3
+         case  FFEBLD_constINTEGER3:
+                 val = ffebld_cu_val_integer3 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+#if FFETARGET_okINTEGER4
+         case  FFEBLD_constINTEGER4:
+#if HOST_BITS_PER_LONGLONG > HOST_BITS_PER_WIDE_INT
+                 {
+                   long long int big = ffebld_cu_val_integer4 (*cu);
+                   item = build_int_2 ((HOST_WIDE_INT) big,
+                                       (HOST_WIDE_INT)
+                                       (big >> HOST_BITS_PER_WIDE_INT));
+                 }
+#else
+                 val = ffebld_cu_val_integer4 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+#endif
+                 break;
+#endif
+#if FFETARGET_okLOGICAL1
+         case  FFEBLD_constLOGICAL1:
+                 val = ffebld_cu_val_logical1 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+#if FFETARGET_okLOGICAL2
+          case  FFEBLD_constLOGICAL2:
+                 val = ffebld_cu_val_logical2 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+#if FFETARGET_okLOGICAL3
+         case  FFEBLD_constLOGICAL3:
+                 val = ffebld_cu_val_logical3 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+#if FFETARGET_okLOGICAL4
+         case  FFEBLD_constLOGICAL4:
+                 val = ffebld_cu_val_logical4 (*cu);
+                 item = build_int_2 (val, (val < 0) ? -1 : 0);
+                 break;
+#endif
+         default:
+                 assert ("constant type not supported"==NULL);
+                 return error_mark_node;
+                 break;
+  }
+
+  TREE_TYPE (item) = tree_type;
+
+  TREE_CONSTANT (item) = 1;
+
+  return item;
+}
 /* Transform expression into constant tree.
 
    If the expression can be transformed into a tree that is constant,
@@ -10612,10 +10659,6 @@ ffecom_const_expr (ffebld expr)
 
   if (ffebld_arity (expr) == 0
       && (ffebld_op (expr) != FFEBLD_opSYMTER
-#if NEWCOMMON
-         /* ~~Enable once common/equivalence is handled properly?  */
-         || ffebld_where (expr) == FFEINFO_whereCOMMON
-#endif
          || ffebld_where (expr) == FFEINFO_whereGLOBAL
          || ffebld_where (expr) == FFEINFO_whereINTRINSIC))
     {
@@ -10653,12 +10696,6 @@ ffecom_close_include (FILE *f)
   ffecom_close_include_ (f);
 }
 
-int
-ffecom_decode_include_option (char *spec)
-{
-  return ffecom_decode_include_option_ (spec);
-}
-
 /* End a compound statement (block).  */
 
 tree
@@ -10847,16 +10884,6 @@ ffecom_expand_let_stmt (ffebld dest, ffebld source)
        expr_tree = source_tree;
       else if (assign_temp)
        {
-#ifdef MOVE_EXPR
-         /* The back end understands a conceptual move (evaluate source;
-            store into dest), so use that, in case it can determine
-            that it is going to use, say, two registers as temporaries
-            anyway.  So don't use the temp (and someday avoid generating
-            it, once this code starts triggering regularly).  */
-         expr_tree = ffecom_2s (MOVE_EXPR, void_type_node,
-                                dest_tree,
-                                source_tree);
-#else
          expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node,
                                 assign_temp,
                                 source_tree);
@@ -10864,7 +10891,6 @@ ffecom_expand_let_stmt (ffebld dest, ffebld source)
          expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node,
                                 dest_tree,
                                 assign_temp);
-#endif
        }
       else
        expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node,
@@ -11104,9 +11130,9 @@ ffecom_init_0 ()
   tree field;
   ffetype type;
   ffetype base_type;
-  tree double_ftype_double;
-  tree float_ftype_float;
-  tree ldouble_ftype_ldouble;
+  tree double_ftype_double, double_ftype_double_double;
+  tree float_ftype_float, float_ftype_float_float;
+  tree ldouble_ftype_ldouble, ldouble_ftype_ldouble_ldouble;
   tree ffecom_tree_ptr_to_fun_type_void;
 
   /* This block of code comes from the now-obsolete cktyps.c.  It checks
@@ -11239,18 +11265,21 @@ ffecom_init_0 ()
 
   endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE);
 
-  float_ftype_float
-    = build_function_type (float_type_node,
-                          tree_cons (NULL_TREE, float_type_node, endlink));
+  t = tree_cons (NULL_TREE, float_type_node, endlink);
+  float_ftype_float = build_function_type (float_type_node, t);
+  t = tree_cons (NULL_TREE, float_type_node, t);
+  float_ftype_float_float = build_function_type (float_type_node, t);
 
-  double_ftype_double
-    = build_function_type (double_type_node,
-                          tree_cons (NULL_TREE, double_type_node, endlink));
+  t = tree_cons (NULL_TREE, double_type_node, endlink);
+  double_ftype_double = build_function_type (double_type_node, t);
+  t = tree_cons (NULL_TREE, double_type_node, t);
+  double_ftype_double_double = build_function_type (double_type_node, t);
 
-  ldouble_ftype_ldouble
-    = build_function_type (long_double_type_node,
-                          tree_cons (NULL_TREE, long_double_type_node,
-                                     endlink));
+  t = tree_cons (NULL_TREE, long_double_type_node, endlink);
+  ldouble_ftype_ldouble = build_function_type (long_double_type_node, t);
+  t = tree_cons (NULL_TREE, long_double_type_node, t);
+  ldouble_ftype_ldouble_ldouble = build_function_type (long_double_type_node,
+                                                       t);
 
   for (i = 0; ((size_t) i) < ARRAY_SIZE (ffecom_tree_type); ++i)
     for (j = 0; ((size_t) j) < ARRAY_SIZE (ffecom_tree_type[0]); ++j)
@@ -11667,18 +11696,20 @@ ffecom_init_0 ()
   ffecom_tree_blockdata_type
     = build_function_type (void_type_node, NULL_TREE);
 
-  builtin_function ("__builtin_sqrtf", float_ftype_float,
-                   BUILT_IN_SQRTF, BUILT_IN_NORMAL, "sqrtf", NULL_TREE);
-  builtin_function ("__builtin_sqrt", double_ftype_double,
-                   BUILT_IN_SQRT, BUILT_IN_NORMAL, "sqrt", NULL_TREE);
-  builtin_function ("__builtin_sqrtl", ldouble_ftype_ldouble,
-                   BUILT_IN_SQRTL, BUILT_IN_NORMAL, "sqrtl", NULL_TREE);
-  builtin_function ("__builtin_sinf", float_ftype_float,
-                   BUILT_IN_SINF, BUILT_IN_NORMAL, "sinf", NULL_TREE);
-  builtin_function ("__builtin_sin", double_ftype_double,
-                   BUILT_IN_SIN, BUILT_IN_NORMAL, "sin", NULL_TREE);
-  builtin_function ("__builtin_sinl", ldouble_ftype_ldouble,
-                   BUILT_IN_SINL, BUILT_IN_NORMAL, "sinl", NULL_TREE);
+  builtin_function ("__builtin_atanf", float_ftype_float,
+                   BUILT_IN_ATANF, BUILT_IN_NORMAL, "atanf", NULL_TREE);
+  builtin_function ("__builtin_atan", double_ftype_double,
+                   BUILT_IN_ATAN, BUILT_IN_NORMAL, "atan", NULL_TREE);
+  builtin_function ("__builtin_atanl", ldouble_ftype_ldouble,
+                   BUILT_IN_ATANL, BUILT_IN_NORMAL, "atanl", NULL_TREE);
+
+  builtin_function ("__builtin_atan2f", float_ftype_float_float,
+                   BUILT_IN_ATAN2F, BUILT_IN_NORMAL, "atan2f", NULL_TREE);
+  builtin_function ("__builtin_atan2", double_ftype_double_double,
+                   BUILT_IN_ATAN2, BUILT_IN_NORMAL, "atan2", NULL_TREE);
+  builtin_function ("__builtin_atan2l", ldouble_ftype_ldouble_ldouble,
+                   BUILT_IN_ATAN2L, BUILT_IN_NORMAL, "atan2l", NULL_TREE);
+
   builtin_function ("__builtin_cosf", float_ftype_float,
                    BUILT_IN_COSF, BUILT_IN_NORMAL, "cosf", NULL_TREE);
   builtin_function ("__builtin_cos", double_ftype_double,
@@ -11686,6 +11717,62 @@ ffecom_init_0 ()
   builtin_function ("__builtin_cosl", ldouble_ftype_ldouble,
                    BUILT_IN_COSL, BUILT_IN_NORMAL, "cosl", NULL_TREE);
 
+  builtin_function ("__builtin_expf", float_ftype_float,
+                   BUILT_IN_EXPF, BUILT_IN_NORMAL, "expf", NULL_TREE);
+  builtin_function ("__builtin_exp", double_ftype_double,
+                   BUILT_IN_EXP, BUILT_IN_NORMAL, "exp", NULL_TREE);
+  builtin_function ("__builtin_expl", ldouble_ftype_ldouble,
+                   BUILT_IN_EXPL, BUILT_IN_NORMAL, "expl", NULL_TREE);
+
+  builtin_function ("__builtin_floorf", float_ftype_float,
+                   BUILT_IN_FLOORF, BUILT_IN_NORMAL, "floorf", NULL_TREE);
+  builtin_function ("__builtin_floor", double_ftype_double,
+                   BUILT_IN_FLOOR, BUILT_IN_NORMAL, "floor", NULL_TREE);
+  builtin_function ("__builtin_floorl", ldouble_ftype_ldouble,
+                   BUILT_IN_FLOORL, BUILT_IN_NORMAL, "floorl", NULL_TREE);
+
+  builtin_function ("__builtin_fmodf", float_ftype_float_float,
+                   BUILT_IN_FMODF, BUILT_IN_NORMAL, "fmodf", NULL_TREE);
+  builtin_function ("__builtin_fmod", double_ftype_double_double,
+                   BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod", NULL_TREE);
+  builtin_function ("__builtin_fmodl", ldouble_ftype_ldouble_ldouble,
+                   BUILT_IN_FMODL, BUILT_IN_NORMAL, "fmodl", NULL_TREE);
+
+  builtin_function ("__builtin_logf", float_ftype_float,
+                   BUILT_IN_LOGF, BUILT_IN_NORMAL, "logf", NULL_TREE);
+  builtin_function ("__builtin_log", double_ftype_double,
+                   BUILT_IN_LOG, BUILT_IN_NORMAL, "log", NULL_TREE);
+  builtin_function ("__builtin_logl", ldouble_ftype_ldouble,
+                   BUILT_IN_LOGL, BUILT_IN_NORMAL, "logl", NULL_TREE);
+
+  builtin_function ("__builtin_powf", float_ftype_float_float,
+                   BUILT_IN_POWF, BUILT_IN_NORMAL, "powf", NULL_TREE);
+  builtin_function ("__builtin_pow", double_ftype_double_double,
+                   BUILT_IN_POW, BUILT_IN_NORMAL, "pow", NULL_TREE);
+  builtin_function ("__builtin_powl", ldouble_ftype_ldouble_ldouble,
+                   BUILT_IN_POWL, BUILT_IN_NORMAL, "powl", NULL_TREE);
+
+  builtin_function ("__builtin_sinf", float_ftype_float,
+                   BUILT_IN_SINF, BUILT_IN_NORMAL, "sinf", NULL_TREE);
+  builtin_function ("__builtin_sin", double_ftype_double,
+                   BUILT_IN_SIN, BUILT_IN_NORMAL, "sin", NULL_TREE);
+  builtin_function ("__builtin_sinl", ldouble_ftype_ldouble,
+                   BUILT_IN_SINL, BUILT_IN_NORMAL, "sinl", NULL_TREE);
+
+  builtin_function ("__builtin_sqrtf", float_ftype_float,
+                   BUILT_IN_SQRTF, BUILT_IN_NORMAL, "sqrtf", NULL_TREE);
+  builtin_function ("__builtin_sqrt", double_ftype_double,
+                   BUILT_IN_SQRT, BUILT_IN_NORMAL, "sqrt", NULL_TREE);
+  builtin_function ("__builtin_sqrtl", ldouble_ftype_ldouble,
+                   BUILT_IN_SQRTL, BUILT_IN_NORMAL, "sqrtl", NULL_TREE);
+
+  builtin_function ("__builtin_tanf", float_ftype_float,
+                   BUILT_IN_TANF, BUILT_IN_NORMAL, "tanf", NULL_TREE);
+  builtin_function ("__builtin_tan", double_ftype_double,
+                   BUILT_IN_TAN, BUILT_IN_NORMAL, "tan", NULL_TREE);
+  builtin_function ("__builtin_tanl", ldouble_ftype_ldouble,
+                   BUILT_IN_TANL, BUILT_IN_NORMAL, "tanl", NULL_TREE);
+
   pedantic_lvalues = FALSE;
 
   ffecom_f2c_make_type_ (&ffecom_f2c_integer_type_node,
@@ -13044,7 +13131,7 @@ ffecom_which_entrypoint_decl ()
 static void
 bison_rule_pushlevel_ ()
 {
-  emit_line_note (input_filename, lineno);
+  emit_line_note (input_filename, input_line);
   pushlevel (0);
   clear_last_expr ();
   expand_start_bindings (0);
@@ -13060,7 +13147,7 @@ bison_rule_compstmt_ ()
   if (! keep)
     current_binding_level->names = NULL_TREE;
 
-  emit_line_note (input_filename, lineno);
+  emit_line_note (input_filename, input_line);
   expand_end_bindings (getdecls (), keep, 0);
   t = poplevel (keep, 1, 0);
 
@@ -13221,9 +13308,6 @@ duplicate_decls (tree newdecl, tree olddecl)
       COPY_DECL_RTL (olddecl, newdecl);
 
       /* Merge the type qualifiers.  */
-      if (DECL_BUILT_IN_NONANSI (olddecl) && TREE_THIS_VOLATILE (olddecl)
-         && !TREE_THIS_VOLATILE (newdecl))
-       TREE_THIS_VOLATILE (olddecl) = 0;
       if (TREE_READONLY (newdecl))
        TREE_READONLY (olddecl) = 1;
       if (TREE_THIS_VOLATILE (newdecl))
@@ -13263,10 +13347,17 @@ duplicate_decls (tree newdecl, tree olddecl)
       if (DECL_SECTION_NAME (newdecl) == NULL_TREE)
        DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl);
 
+      /* Copy the assembler name.  */
+      COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
+
       if (TREE_CODE (newdecl) == FUNCTION_DECL)
        {
          DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl);
          DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl);
+         TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
+         TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
+         DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
+         DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
        }
     }
   /* If cannot merge, then use the new type and qualifiers,
@@ -13513,7 +13604,7 @@ finish_function (int nested)
 
       /* Obey `register' declarations if `setjmp' is called in this fn.  */
       /* Generate rtl for function exit.  */
-      expand_function_end (input_filename, lineno, 0);
+      expand_function_end (input_filename, input_line, 0);
 
       /* If this is a nested function, protect the local variables in the stack
         above us from being collected while we're compiling this function.  */
@@ -13750,8 +13841,7 @@ push_parm_decl (tree parm)
 /* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL, if appropriate.  */
 
 static tree
-pushdecl_top_level (x)
-     tree x;
+pushdecl_top_level (tree x)
 {
   register tree t;
   register struct f_binding_level *b = current_binding_level;
@@ -13770,8 +13860,7 @@ pushdecl_top_level (x)
    after they are modified in the light of any missing parameters.  */
 
 static tree
-storedecls (decls)
-     tree decls;
+storedecls (tree decls)
 {
   return current_binding_level->names = decls;
 }
@@ -13795,11 +13884,9 @@ store_parm_decls (int is_main_program UNUSED)
   DECL_ARGUMENTS (fndecl) = storedecls (nreverse (getdecls ()));
 
   /* Initialize the RTL code for the function.  */
-
-  init_function_start (fndecl, input_filename, lineno);
+  init_function_start (fndecl);
 
   /* Set up parameters and prepare for return, for the function.  */
-
   expand_function_start (fndecl, 0);
 }
 
@@ -13935,8 +14022,7 @@ start_function (tree name, tree type, int nested, int public)
 /* Here are the public functions the GNU back end needs.  */
 
 tree
-convert (type, expr)
-     tree type, expr;
+convert (tree type, tree expr)
 {
   register tree e = expr;
   register enum tree_code code = TREE_CODE (type);
@@ -14007,8 +14093,7 @@ ffecom_init_decl_processing ()
    so that the block can be reinserted where appropriate.  */
 
 static void
-delete_block (block)
-     tree block;
+delete_block (tree block)
 {
   tree t;
   if (current_binding_level->blocks == block)
@@ -14027,8 +14112,7 @@ delete_block (block)
 }
 
 void
-insert_block (block)
-     tree block;
+insert_block (tree block)
 {
   TREE_USED (block) = 1;
   current_binding_level->blocks
@@ -14036,9 +14120,9 @@ insert_block (block)
 }
 
 /* Each front end provides its own.  */
-static const char *ffe_init PARAMS ((const char *));
+static bool ffe_init PARAMS ((void));
 static void ffe_finish PARAMS ((void));
-static void ffe_init_options PARAMS ((void));
+static bool ffe_post_options PARAMS ((const char **));
 static void ffe_print_identifier PARAMS ((FILE *, tree, int));
 
 struct language_function GTY(())
@@ -14054,8 +14138,10 @@ struct language_function GTY(())
 #define LANG_HOOKS_FINISH              ffe_finish
 #undef  LANG_HOOKS_INIT_OPTIONS
 #define LANG_HOOKS_INIT_OPTIONS                ffe_init_options
-#undef  LANG_HOOKS_DECODE_OPTION
-#define LANG_HOOKS_DECODE_OPTION       ffe_decode_option
+#undef  LANG_HOOKS_HANDLE_OPTION
+#define LANG_HOOKS_HANDLE_OPTION       ffe_handle_option
+#undef  LANG_HOOKS_POST_OPTIONS
+#define LANG_HOOKS_POST_OPTIONS                ffe_post_options
 #undef  LANG_HOOKS_PARSE_FILE
 #define LANG_HOOKS_PARSE_FILE          ffe_parse_file
 #undef  LANG_HOOKS_MARK_ADDRESSABLE
@@ -14121,10 +14207,12 @@ const char *const tree_code_name[] = {
 };
 #undef DEFTREECODE
 
-static const char *
-ffe_init (filename)
-     const char *filename;
+static bool
+ffe_post_options (pfilename)
+     const char **pfilename;
 {
+  const char *filename = *pfilename;
+
   /* Open input file.  */
   if (filename == 0 || !strcmp (filename, "-"))
     {
@@ -14133,9 +14221,17 @@ ffe_init (filename)
     }
   else
     finput = fopen (filename, "r");
+
   if (finput == 0)
-    fatal_io_error ("can't open %s", filename);
+    fatal_error ("can't open %s: %m", filename);
 
+  return false;
+}
+
+
+static bool
+ffe_init ()
+{
 #ifdef IO_BUFFER_SIZE
   setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE);
 #endif
@@ -14151,11 +14247,8 @@ ffe_init (filename)
   ffelex_hash_kludge (finput);
 
   /* FIXME: The ffelex_hash_kludge code needs to be cleaned up to
-     return the new file name.  */
-  if (main_input_filename)
-    filename = main_input_filename;
-
-  return filename;
+     set the new file name.  Maybe in ffe_post_options.  */
+  return true;
 }
 
 static void
@@ -14169,21 +14262,8 @@ ffe_finish ()
   fclose (finput);
 }
 
-static void
-ffe_init_options ()
-{
-  /* Set default options for Fortran.  */
-  flag_move_all_movables = 1;
-  flag_reduce_all_givs = 1;
-  flag_argument_noalias = 2;
-  flag_merge_constants = 2;
-  flag_errno_math = 0;
-  flag_complex_divide_method = 1;
-}
-
 static bool
-ffe_mark_addressable (exp)
-     tree exp;
+ffe_mark_addressable (tree exp)
 {
   register tree x = exp;
   while (1)
@@ -14222,7 +14302,7 @@ ffe_mark_addressable (exp)
              }
            assert ("address of register var requested" == NULL);
          }
-       put_var_into_stack (x);
+       put_var_into_stack (x, /*rescan=*/true);
 
        /* drops in */
       case FUNCTION_DECL:
@@ -14253,10 +14333,7 @@ ffe_mark_addressable (exp)
    them into the BLOCK.  */
 
 tree
-poplevel (keep, reverse, functionbody)
-     int keep;
-     int reverse;
-     int functionbody;
+poplevel (int keep, int reverse, int functionbody)
 {
   register tree link;
   /* The chain of decls was accumulated in reverse order.
@@ -14392,10 +14469,7 @@ poplevel (keep, reverse, functionbody)
 }
 
 static void
-ffe_print_identifier (file, node, indent)
-     FILE *file;
-     tree node;
-     int indent;
+ffe_print_identifier (FILE *file, tree node, int indent)
 {
   print_node (file, "global", IDENTIFIER_GLOBAL_VALUE (node), indent + 4);
   print_node (file, "local", IDENTIFIER_LOCAL_VALUE (node), indent + 4);
@@ -14410,8 +14484,7 @@ ffe_print_identifier (file, node, indent)
    to agree with what X says.  */
 
 tree
-pushdecl (x)
-     tree x;
+pushdecl (tree x)
 {
   register tree t;
   register tree name = DECL_NAME (x);
@@ -14544,8 +14617,7 @@ kept_level_p ()
    not for that of tags.  */
 
 void
-pushlevel (tag_transparent)
-     int tag_transparent;
+pushlevel (int tag_transparent)
 {
   register struct f_binding_level *newlevel = NULL_BINDING_LEVEL;
 
@@ -14580,8 +14652,7 @@ pushlevel (tag_transparent)
    (the one we are currently in).  */
 
 void
-set_block (block)
-     register tree block;
+set_block (tree block)
 {
   current_binding_level->this_block = block;
   current_binding_level->names = chainon (current_binding_level->names,
@@ -14591,9 +14662,7 @@ set_block (block)
 }
 
 static tree
-ffe_signed_or_unsigned_type (unsignedp, type)
-     int unsignedp;
-     tree type;
+ffe_signed_or_unsigned_type (int unsignedp, tree type)
 {
   tree type2;
 
@@ -14619,8 +14688,7 @@ ffe_signed_or_unsigned_type (unsignedp, type)
 }
 
 static tree
-ffe_signed_type (type)
-     tree type;
+ffe_signed_type (tree type)
 {
   tree type1 = TYPE_MAIN_VARIANT (type);
   ffeinfoKindtype kt;
@@ -14674,8 +14742,7 @@ ffe_signed_type (type)
    The resulting type should always be `integer_type_node'.  */
 
 static tree
-ffe_truthvalue_conversion (expr)
-     tree expr;
+ffe_truthvalue_conversion (tree expr)
 {
   if (TREE_CODE (expr) == ERROR_MARK)
     return expr;
@@ -14772,10 +14839,17 @@ ffe_truthvalue_conversion (expr)
        return ffe_truthvalue_conversion (TREE_OPERAND (expr, 0));
 
     case COND_EXPR:
-      /* Distribute the conversion into the arms of a COND_EXPR.  */
-      return fold (build (COND_EXPR, integer_type_node, TREE_OPERAND (expr, 0),
-                         ffe_truthvalue_conversion (TREE_OPERAND (expr, 1)),
-                         ffe_truthvalue_conversion (TREE_OPERAND (expr, 2))));
+      {
+       /* Distribute the conversion into the arms of a COND_EXPR.  */
+       tree arg1 = TREE_OPERAND (expr, 1);
+       tree arg2 = TREE_OPERAND (expr, 2);
+       if (! VOID_TYPE_P (TREE_TYPE (arg1)))
+         arg1 = ffe_truthvalue_conversion (arg1);
+       if (! VOID_TYPE_P (TREE_TYPE (arg2)))
+         arg2 = ffe_truthvalue_conversion (arg2);
+       return fold (build (COND_EXPR, integer_type_node,
+                           TREE_OPERAND (expr, 0), arg1, arg2));
+      }
 
     case CONVERT_EXPR:
       /* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE,
@@ -14846,9 +14920,7 @@ ffe_truthvalue_conversion (expr)
 }
 
 static tree
-ffe_type_for_mode (mode, unsignedp)
-     enum machine_mode mode;
-     int unsignedp;
+ffe_type_for_mode (enum machine_mode mode, int unsignedp)
 {
   int i;
   int j;
@@ -14906,9 +14978,7 @@ ffe_type_for_mode (mode, unsignedp)
 }
 
 static tree
-ffe_type_for_size (bits, unsignedp)
-     unsigned bits;
-     int unsignedp;
+ffe_type_for_size (unsigned bits, int unsignedp)
 {
   ffeinfoKindtype kt;
   tree type_node;
@@ -14942,8 +15012,7 @@ ffe_type_for_size (bits, unsignedp)
 }
 
 static tree
-ffe_unsigned_type (type)
-     tree type;
+ffe_unsigned_type (tree type)
 {
   tree type1 = TYPE_MAIN_VARIANT (type);
   ffeinfoKindtype kt;
@@ -15026,7 +15095,7 @@ static int max_include_len = 0;
 struct file_name_list
   {
     struct file_name_list *next;
-    char *fname;
+    const char *fname;
     /* Mapping of file names for this directory.  */
     struct file_name_map *name_map;
     /* Nonzero if name_map is valid.  */
@@ -15083,8 +15152,7 @@ static struct file_name_map *read_name_map (const char *dirname);
    FIRST is the beginning of the chain to append, and LAST is the end.  */
 
 static void
-append_include_chain (first, last)
-     struct file_name_list *first, *last;
+append_include_chain (struct file_name_list *first, struct file_name_list *last)
 {
   struct file_name_list *dir;
 
@@ -15114,9 +15182,7 @@ append_include_chain (first, last)
    read_name_map.  */
 
 static FILE *
-open_include_file (filename, searchptr)
-     char *filename;
-     struct file_name_list *searchptr;
+open_include_file (char *filename, struct file_name_list *searchptr)
 {
   register struct file_name_map *map;
   register char *from;
@@ -15253,9 +15319,7 @@ print_containing_files (ffebadSeverity sev)
    file.  */
 
 static char *
-read_filename_string (ch, f)
-     int ch;
-     FILE *f;
+read_filename_string (int ch, FILE *f)
 {
   char *alloc, *set;
   int len;
@@ -15284,8 +15348,7 @@ read_filename_string (ch, f)
 /* Read the file name map file for DIRNAME.  */
 
 static struct file_name_map *
-read_name_map (dirname)
-     const char *dirname;
+read_name_map (const char *dirname)
 {
   /* This structure holds a linked list of file name maps, one per
      directory.  */
@@ -15399,26 +15462,20 @@ ffecom_close_include_ (FILE *f)
   ffewhere_column_kill (instack[indepth].column);
 }
 
-static int
-ffecom_decode_include_option_ (char *spec)
+void
+ffecom_decode_include_option (const char *dir)
 {
-  struct file_name_list *dirtmp;
-
-  if (! ignore_srcdir && !strcmp (spec, "-"))
+  if (! ignore_srcdir && !strcmp (dir, "-"))
     ignore_srcdir = 1;
   else
     {
-      dirtmp = (struct file_name_list *)
+      struct file_name_list *dirtmp = (struct file_name_list *)
        xmalloc (sizeof (struct file_name_list));
       dirtmp->next = 0;                /* New one goes on the end */
-      dirtmp->fname = spec;
+      dirtmp->fname = dir;
       dirtmp->got_name_map = 0;
-      if (spec[0] == 0)
-       error ("directory name must immediately follow -I");
-      else
-       append_include_chain (dirtmp, dirtmp);
+      append_include_chain (dirtmp, dirtmp);
     }
-  return 1;
 }
 
 /* Open INCLUDEd file.  */
@@ -15473,9 +15530,10 @@ ffecom_open_include_ (char *name, ffewhereLine l, ffewhereColumn c)
              if (ep != NULL)
                {
                  n = ep - nam;
-                 dsp[0].fname = (char *) xmalloc (n + 1);
-                 strncpy (dsp[0].fname, nam, n);
-                 dsp[0].fname[n] = '\0';
+                 fname = xmalloc (n + 1);
+                 strncpy (fname, nam, n);
+                 fname[n] = '\0';
+                 dsp[0].fname = fname;
                  if (n + INCLUDE_LEN_FUDGE > max_include_len)
                    max_include_len = n + INCLUDE_LEN_FUDGE;
                }
@@ -15583,7 +15641,7 @@ ffecom_open_include_ (char *name, ffewhereLine l, ffewhereColumn c)
     }
 
   if (dsp[0].fname != NULL)
-    free (dsp[0].fname);
+    free ((char *) dsp[0].fname);
 
   if (f == NULL)
     return NULL;