This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Make all arguments to ENTRY master optional
> 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
>
> * resolve.c (merge_argument_lists): Make all arguments optional.
> * trans-array.c (gfc_trans_dummy_array_bias): Remove special handling
> for arguments to entry master functions.
> * trans-types.c (gfc_sym_type): Same.
No. The special handling is there for a reason.
I've added the following to the testsuite.
Because the master arguments are shared with the individual entry points, I
think you'd also end up (incorrectly) allowing:
call foo()
Paul
! { dg-do compile }
! Arguments to procedures with multiple entry points may be absent, however
! they are not optional, unless explicitly maked as such.
subroutine foo(i, a, b)
logical a(2, 2)
logical b(1)
! Check we don't get an "DIM must not be optional" error
a = any(b, i)
entry bar()
end subroutine