if (!altentries && ((g = ffesymbol_global (fn)) != NULL) && (ffeglobal_type (g) == gt)) { ffeglobal_set_hook (g, current_function_decl); }
ffecom_start_progunit_ (){  ffesymbol fn = ffecom_primary_entry_;  ffebld arglist;  tree id;			/* Identifier (name) of function. */  tree type;			/* Type of function. */  tree result;			/* Result of function. */  ffeinfoBasictype bt;  ffeinfoKindtype kt;  bool charfunc;  bool cmplxfunc;  bool altentries = (ffecom_num_entrypoints_ != 0);  bool multi  = altentries  && (ffecom_primary_entry_kind_ == FFEINFO_kindFUNCTION)  && (ffecom_master_bt_ == FFEINFO_basictypeNONE);  bool main_program = FALSE;  int old_lineno = lineno;  char *old_input_filename = input_filename;  int yes;  assert (fn != NULL);  assert (ffesymbol_hook (fn).decl_tree == NULL_TREE);  input_filename = ffesymbol_where_filename (fn);  lineno = ffesymbol_where_filelinenum (fn);  /* c-parse.y indeed does call suspend_momentary and not only ignores the     return value, but also never calls resume_momentary, when starting an     outer function (see "fndef:", "setspecs:", and so on).  So g77 does the     same thing.  It shouldn't be a problem since start_function calls     temporary_allocation, but it might be necessary.  If it causes a problem     here, then maybe there's a bug lurking in gcc.  NOTE: This identical     comment appears twice in thist file.  */  suspend_momentary ();  switch (ffecom_primary_entry_kind_)    {    case FFEINFO_kindPROGRAM:      main_program = TRUE;      /* Fall through. */    case FFEINFO_kindBLOCKDATA:      bt = FFEINFO_basictypeNONE;      kt = FFEINFO_kindtypeNONE;      type = ffecom_tree_fun_type_void;      charfunc = FALSE;      cmplxfunc = FALSE;      break;    case FFEINFO_kindFUNCTION:      bt = ffesymbol_basictype (fn);      kt = ffesymbol_kindtype (fn);      if (bt == FFEINFO_basictypeNONE)	{	  ffeimplic_establish_symbol (fn);	  if (ffesymbol_funcresult (fn) != NULL)	    ffeimplic_establish_symbol (ffesymbol_funcresult (fn));	  bt = ffesymbol_basictype (fn);	  kt = ffesymbol_kindtype (fn);	}      if (multi)	charfunc = cmplxfunc = FALSE;      else if (bt == FFEINFO_basictypeCHARACTER)	charfunc = TRUE, cmplxfunc = FALSE;      else if ((bt == FFEINFO_basictypeCOMPLEX)	       && ffesymbol_is_f2c (fn)	       && !altentries)	charfunc = FALSE, cmplxfunc = TRUE;      else	charfunc = cmplxfunc = FALSE;      if (multi || charfunc)	type = ffecom_tree_fun_type_void;      else if (ffesymbol_is_f2c (fn) && !altentries)	type = ffecom_tree_fun_type[bt][kt];      else	type = build_function_type (ffecom_tree_type[bt][kt], NULL_TREE);      if ((type == NULL_TREE)	  || (TREE_TYPE (type) == NULL_TREE))	type = ffecom_tree_fun_type_void;	/* _sym_exec_transition. */      break;    case FFEINFO_kindSUBROUTINE:      bt = FFEINFO_basictypeNONE;      kt = FFEINFO_kindtypeNONE;      if (ffecom_is_altreturning_)	type = ffecom_tree_subr_type;      else	type = ffecom_tree_fun_type_void;      charfunc = FALSE;      cmplxfunc = FALSE;      break;    default:      assert ("say what??" == NULL);      /* Fall through. */    case FFEINFO_kindANY:      bt = FFEINFO_basictypeNONE;      kt = FFEINFO_kindtypeNONE;      type = error_mark_node;      charfunc = FALSE;      cmplxfunc = FALSE;      break;    }  if (altentries)    id = ffecom_get_invented_identifier ("__g77_masterfun_%s",					 ffesymbol_text (fn),					 0);#if FFETARGET_isENFORCED_MAIN  else if (main_program)    id = get_identifier (FFETARGET_nameENFORCED_MAIN_NAME);#endif  else    id = ffecom_get_external_identifier_ (fn);  start_function (id,		  type,		  0,		/* nested/inline */		  !altentries);	/* TREE_PUBLIC */  yes = suspend_momentary ();  /* Arg handling needs exec-transitioned ffesymbols to work with.  But     exec-transitioning needs current_function_decl to be filled in.  So we     do these things in two phases. */  if (altentries)    {				/* 1st arg identifies which entrypoint. */      ffecom_which_entrypoint_decl_	= build_decl (PARM_DECL,		      ffecom_get_invented_identifier ("__g77_%s",						      "which_entrypoint",						      0),		      integer_type_node);      push_parm_decl (ffecom_which_entrypoint_decl_);    }  if (charfunc      || cmplxfunc      || multi)    {				/* Arg for result (return value). */      tree type;      tree length;      if (charfunc)	type = ffecom_tree_type[FFEINFO_basictypeCHARACTER][kt];      else if (cmplxfunc)	type = ffecom_tree_type[FFEINFO_basictypeCOMPLEX][kt];      else	type = ffecom_multi_type_node_;      result = ffecom_get_invented_identifier ("__g77_%s",					       "result", 0);      /* Make length arg _and_ enhance type info for CHAR arg itself.  */      if (charfunc)	length = ffecom_char_enhance_arg_ (&type, fn);      else	length = NULL_TREE;	/* Not ref'd if !charfunc. */      type = build_pointer_type (type);      result = build_decl (PARM_DECL, result, type);      push_parm_decl (result);      if (multi)	ffecom_multi_retval_ = result;      else	ffecom_func_result_ = result;      if (charfunc)	{	  push_parm_decl (length);	  ffecom_func_length_ = length;	}    }  if (ffecom_primary_entry_is_proc_)    {      if (altentries)	arglist = ffecom_master_arglist_;      else	arglist = ffesymbol_dummyargs (fn);      ffecom_push_dummy_decls_ (arglist, FALSE);    }  resume_momentary (yes);  store_parm_decls (main_program ? 1 : 0);  ffecom_start_compstmt_ ();  lineno = old_lineno;  input_filename = old_input_filename;  /* This handles any symbols still untransformed, in case -g specified.     This used to be done in ffecom_finish_progunit, but it turns out to     be necessary to do it here so that statement functions are     expanded before code.  But don't bother for BLOCK DATA.  */  if (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA)    ffesymbol_drive (ffecom_finish_symbol_transform_);}