This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/36325] specific or generic INTERFACE implies the EXTERNAL attribute



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]