This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR37583 - ICE "insert_bbt(): Duplicate key" for self-calling ENTRY subprogram


Tobias,

> OK. Thanks for the quick patch.
>

I realised that instead of adding a line as in:

*** gcc/fortran/decl.c	(revision 140493)
--- gcc/fortran/decl.c	(working copy)
*************** gfc_match_entry (void)
*** 4640,4646 ****
    if (get_proc_name (name, &entry,
  		     gfc_current_ns->parent != NULL
  		     && module_procedure
! 		     && gfc_current_ns->proc_name->attr.function))
      return MATCH_ERROR;

    proc = gfc_current_block ();
--- 4640,4647 ----
    if (get_proc_name (name, &entry,
  		     gfc_current_ns->parent != NULL
  		     && module_procedure
! 		     && (gfc_current_ns->proc_name->attr.function
! 			   || gfc_current_ns->proc_name->attr.subroutine)))
      return MATCH_ERROR;

    proc = gfc_current_block ();

elimination works just as well...

--- 4640,4645 ----
    if (get_proc_name (name, &entry,
  		     gfc_current_ns->parent != NULL
  		     && module_procedure)
      return MATCH_ERROR;

    proc = gfc_current_block ();

It's regtesting right now.

Cheers and thanks

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]