This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36553] Missing interface not detected in call to same file function
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2010 10:44:26 -0000
- Subject: [Bug fortran/36553] Missing interface not detected in call to same file function
- References: <bug-36553-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from dfranke at gcc dot gnu dot org 2010-05-24 10:44 -------
(In reply to comment #12)
> With -fwhole-file, we get for the short testcase:
>
> ../pr36553/pr36553.f90:2.9:
>
> print *, f( (/ 0.0, 1.0/) )
> 1
> Error: The reference to function 'f' at (1) either needs an explicit
> INTERFACE or the rank is incorrect
Argh! How did I miss that?
Ok, if the array valued result is removed, it goes again unnoticed:
real :: f
print *, f( (/ 0.0, 1.0/) )
end
function f(x)
real, intent(in) :: x(:) ! assumed shape requires explicit interface in
caller
real :: f
f = sum(x)
end function
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553