This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53956] Proc-pointer w/ interface: Bogus "EXTERNAL attribute conflicts with FUNCTION attribute"
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jul 2012 20:49:50 +0000
- Subject: [Bug fortran/53956] Proc-pointer w/ interface: Bogus "EXTERNAL attribute conflicts with FUNCTION attribute"
- Auto-submitted: auto-generated
- References: <bug-53956-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53956
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-07-13
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from janus at gcc dot gnu.org 2012-07-13 20:49:50 UTC ---
The error itself should be quite easy to fix. Here is a draft patch (not
regtested yet):
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 189470)
+++ gcc/fortran/resolve.c (working copy)
@@ -10843,7 +10843,8 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag
return FAILURE;
}
if (sym->attr.external && sym->attr.function
- && ((sym->attr.if_source == IFSRC_DECL && !sym->attr.procedure)
+ && ((sym->attr.if_source == IFSRC_DECL && !sym->attr.procedure
+ && !sym->attr.dummy)
|| sym->attr.contained))
{
gfc_error ("EXTERNAL attribute conflicts with FUNCTION attribute "
However, there seems to be an additional problem with the locus. Plus, I'm not
sure why the error only occurs with the PROCEDURE statement.