http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53956

--- Comment #3 from janus at gcc dot gnu.org 2012-07-14 13:01:22 UTC ---
(In reply to comment #2)
> Plus, I'm not
> sure why the error only occurs with the PROCEDURE statement.

Regarding the test case in comment #1, the difference between the c2-args of
'sub' and 'fp' is that the former has IFSRC_UNKNOWN, while the latter has
IFSRC_DECL.

The latter symbol is created by 'gfc_copy_formal_args', and therefore an
alternative (and probably preferable) patch would be:


Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c    (revision 189470)
+++ gcc/fortran/symbol.c    (working copy)
@@ -4110,7 +4110,7 @@ gfc_copy_formal_args (gfc_symbol *dest, gfc_symbol
     }

   /* Add the interface to the symbol.  */
-  add_proc_interface (dest, IFSRC_DECL, head);
+  add_proc_interface (dest, src->attr.if_source, head);

   /* Store the formal namespace information.  */
   if (dest->formal != NULL)



> However, there seems to be an additional problem with the locus. 

... which is not a real problem, I guess (since the error message is fake
anyway).

Reply via email to