case FFESTV_stateSUBROUTINE1:
ffestc_R1226 (ffelexToken entryname, ffesttTokenList args,	      ffelexToken final UNUSED){  ffesymbol s;  ffesymbol fs;  ffesymbolAttrs sa;  ffesymbolAttrs na;  bool in_spec;			/* TRUE if further specification statements				   may follow, FALSE if executable stmts. */  bool in_func;			/* TRUE if ENTRY is a FUNCTION, not				   SUBROUTINE. */  assert ((entryname != NULL)	  && (ffelex_token_type (entryname) == FFELEX_typeNAME));  ffestc_check_simple_ ();  if (ffestc_order_entry_ () != FFESTC_orderOK_)    return;  ffestc_labeldef_useless_ ();  switch (ffestw_state (ffestw_stack_top ()))    {    case FFESTV_stateFUNCTION2:    case FFESTV_stateFUNCTION3:      in_func = TRUE;      in_spec = TRUE;      break;    case FFESTV_stateFUNCTION4:      in_func = TRUE;      in_spec = FALSE;      break;    case FFESTV_stateSUBROUTINE2:    case FFESTV_stateSUBROUTINE3:      in_func = FALSE;      in_spec = TRUE;      break;    case FFESTV_stateSUBROUTINE4:      in_func = FALSE;      in_spec = FALSE;      break;    default:      assert ("ENTRY not in FUNCTION or SUBROUTINE?" == NULL);      in_func = FALSE;      in_spec = FALSE;      break;    }  if (in_func)    fs = ffesymbol_declare_funcunit (entryname);  else    fs = ffesymbol_declare_subrunit (entryname);  if (ffesymbol_state (fs) == FFESYMBOL_stateNONE)    ffesymbol_set_state (fs, FFESYMBOL_stateUNDERSTOOD);  else    {      if (ffesymbol_kind (fs) != FFEINFO_kindANY)	ffesymbol_error (fs, entryname);    }  ++ffestc_entry_num_;  ffebld_init_list (&fs->dummy_args, &ffestc_local_.dummy.list_bottom);  if (in_spec)    ffestt_tokenlist_drive (args, ffestc_promote_dummy_);  else    ffestt_tokenlist_drive (args, ffestc_promote_execdummy_);  ffebld_end_list (&ffestc_local_.dummy.list_bottom);  if (in_func)    {      s = ffesymbol_declare_funcresult (entryname);      ffesymbol_set_funcresult (fs, s);      ffesymbol_set_funcresult (s, fs);      sa = ffesymbol_attrs (s);      /* Figure out what kind of object we've got based on previous	 declarations of or references to the object. */      if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD)	na = FFESYMBOL_attrsetNONE;      else if (sa & FFESYMBOL_attrsANY)	na = FFESYMBOL_attrsANY;      else if (!(sa & ~(FFESYMBOL_attrsANYLEN			| FFESYMBOL_attrsTYPE)))	na = sa | FFESYMBOL_attrsRESULT;      else	na = FFESYMBOL_attrsetNONE;      /* Now see what we've got for a new object: NONE means a new error	 cropped up; ANY means an old error to be ignored; otherwise,	 everything's ok, update the object (symbol) and continue on. */      if (na == FFESYMBOL_attrsetNONE)	{	  ffesymbol_error (s, entryname);	  ffestc_parent_ok_ = FALSE;	}      else if (na & FFESYMBOL_attrsANY)	{	  ffestc_parent_ok_ = FALSE;	}      else	{	  ffesymbol_set_attrs (s, na);	  if (ffesymbol_state (s) == FFESYMBOL_stateNONE)	    ffesymbol_set_state (s, FFESYMBOL_stateSEEN);	  else if (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)	    {	      ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD);	      ffesymbol_set_info (s,				  ffeinfo_new (ffesymbol_basictype (s),					       ffesymbol_kindtype (s),					       0,					       FFEINFO_kindENTITY,					       FFEINFO_whereRESULT,					       ffesymbol_size (s)));	      ffesymbol_resolve_intrin (s);	      ffestorag_exec_layout (s);	    }	}      /* Since ENTRY might appear after executable stmts, do what would have	 been done if it hadn't -- give symbol implicit type and	 exec-transition it.  */      if (!in_spec && ffesymbol_is_specable (s))	{	  if (!ffeimplic_establish_symbol (s))	/* Do implicit typing. */	    ffesymbol_error (s, entryname);	  s = ffecom_sym_exec_transition (s);	}      /* Use whatever type info is available for ENTRY to set up type for its	 global-name-space function symbol relative.  */      ffesymbol_set_info (fs,			  ffeinfo_new (ffesymbol_basictype (s),				       ffesymbol_kindtype (s),				       0,				       FFEINFO_kindFUNCTION,				       FFEINFO_whereLOCAL,				       ffesymbol_size (s)));      /* Now implicit-type and exec-transition the FUNCTION. ~~Question??:	 When ENTRY FOO() RESULT(IBAR) is supported, what will the typing be	 if FOO and IBAR would normally end up with different types?  I think	 the answer is that FOO is always given whatever type would be chosen	 for IBAR, rather than the other way around, and I think it ends up	 working that way for FUNCTION FOO() RESULT(IBAR), but this should be	 checked out in all its different combos. Related question is, is	 there any way that FOO in either case ends up without type info	 filled in?  Does anyone care?  */      ffesymbol_signal_unreported (s);    }  else    {      ffesymbol_set_info (fs,			  ffeinfo_new (FFEINFO_basictypeNONE,				       FFEINFO_kindtypeNONE,				       0,				       FFEINFO_kindSUBROUTINE,				       FFEINFO_whereLOCAL,				       FFETARGET_charactersizeNONE));    }  if (!in_spec)    fs = ffecom_sym_exec_transition (fs);  ffesymbol_signal_unreported (fs);  ffestd_R1226 (fs);}