[Bug fortran/37445] Host-associated proc not found if same-name generic is use-associated
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Sep 9 18:46:00 GMT 2008
------- Comment #4 from burnus at gcc dot gnu dot org 2008-09-09 18:44 -------
Paul, sounds like a bug for you.
* * *
The problem is that gfortran calls the use-associated (generic or specific)
procedure instead of the host-associated procedure. (The procedure is
use-associated in the specification part of a module).
If the procedure is USEd in the subroutine or in a PROGRAM, all compilers print
an error.
* * *
I wonder whether the following is valid:
module m2
use, only: s1
All compilers accept this. However, how to read then the following, assuming
that s1 is also a host-associated procedure:
MODULE M2
USE M1, only: s1
procedure(),pointer :: procptr => s1
(Note: "procptr => s1" is Fortran 2008 syntax; F2003 only allows "=> null()".)
Actually, I would reject a program if "only:" is specified [or for "use m2,
s1=>s2"], but I have not checked the standard, yet.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Summary|incorrect error reported |Host-associated proc not
| |found if same-name generic
| |is use-associated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37445
More information about the Gcc-bugs
mailing list