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/36553] Missing interface not detected in call to same file function



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


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