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

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun Sep 21 16:55:00 GMT 2008


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



More information about the Fortran mailing list