------- Comment #10 from paul dot richard dot thomas at cea dot fr  2006-04-05 
07:02 -------
> program main
>   call foo (5)
> end program main
> subroutine foo(n, a)
>   integer :: n
>   integer, dimension(5), optional :: a
>   print *, n
>   if (present (a)) call abort ()
> end subroutine foo

Andrew is right about this; gfortran does not communicate the "interface"
(that's the word that you were looking for, Andrew) between same file but
separate procedures.  Thus, MAIN does not "know" that the second argument is
optional. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27035

Reply via email to