This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36325] specific or generic INTERFACE implies the EXTERNAL attribute
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 May 2008 18:44:06 -0000
- Subject: [Bug fortran/36325] specific or generic INTERFACE implies the EXTERNAL attribute
- References: <bug-36325-14773@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from janus at gcc dot gnu dot org 2008-05-26 18:44 -------
Created an attachment (id=15687)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15687&action=view)
patch version 2
The attached new version of the patch fixes the reduction3.f90 testcase by
deleting the interface statement (the "intrinsic" has to stay I think).
Moreover it includes another related bugfix (see PR35830 comment #2).
Regarding Tobi's comment #7:
interface
real function bar()
end function bar
end interface
dimension :: bar(4)
Why would I need to reject this? At least it's compatible with
conflict(external with implicit interface, dimension)
because it has an explicit interface. I think the problem is rather that the
dimension statement contradicts the interface statement, which says that 'bar'
returns a scalar real number (and not an array).
g95's error message is:
dimension :: bar(4)
1
Error: Attribute declaration of 'bar' at (1) is outside of the INTERFACE body
So I guess it is indeed invalid (and accepted by gfortran), but this seems to
be unrelated to this PR (probably it deserves a separate PR).
Apart from this I see no remaining problems. The patch regtests without any
failures.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36325