This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32157] intrinsic function name conflicts with subroutine if present in the same file
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2007 13:03:02 -0000
- Subject: [Bug fortran/32157] intrinsic function name conflicts with subroutine if present in the same file
- References: <bug-32157-14284@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2007-06-22 13:03 -------
This fixes it:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (révision 125706)
+++ gcc/fortran/resolve.c (copie de travail)
@@ -1568,6 +1568,8 @@ resolve_function (gfc_expr *expr)
/* If the procedure is not internal, a statement function or a module
procedure,it must be external and should be checked for usage. */
if (sym && !sym->attr.dummy && !sym->attr.contained
+ && !(sym->attr.intrinsic
+ || gfc_intrinsic_name (sym->name, sym->attr.subroutine))
&& sym->attr.proc != PROC_ST_FUNCTION
&& !sym->attr.use_assoc
&& sym->name )
We paybe need a helper function, gfc_is_external - I'll check if there are
other clients.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-05-30 16:58:58 |2007-06-22 13:03:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32157