[Bug fortran/16940] implicit none over-riding module declaration
tobi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Aug 29 22:46:00 GMT 2004
------- Additional Comments From tobi at gcc dot gnu dot org 2004-08-29 22:46 -------
Thinking about this some more, I thought of this one-line fix. And indeed, it
seems to work. The funky thing that was going on was that we tried to give a
type to the symbol which represents the named interface. This of course makes no
sense.
I will post this patch to the mailing list once the testsuite finishes and after
testing with some more testcases to make sure that this doesn't break anything else.
Index: resolve.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/resolve.c,v
retrieving revision 1.16
diff -u -p -r1.16 resolve.c
--- resolve.c 27 Aug 2004 14:49:34 -0000 1.16
+++ resolve.c 29 Aug 2004 22:43:17 -0000
@@ -3828,7 +3828,8 @@ resolve_symbol (gfc_symbol * sym)
if (sym->attr.flavor == FL_VARIABLE || sym->attr.flavor == FL_PARAMETER)
gfc_set_default_type (sym, 1, NULL);
- if (sym->attr.flavor == FL_PROCEDURE && sym->attr.function)
+ if (sym->attr.flavor == FL_PROCEDURE && sym->attr.function
+ && !sym->generic)
{
if (!mp_flag)
gfc_set_default_type (sym, 0, NULL);
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
Keywords| |patch, rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16940
More information about the Gcc-bugs
mailing list