------- Comment #2 from burnus at gcc dot gnu dot org  2007-02-20 08:57 -------
> The following is legal but we segfault on execution:

>  subroutine checkv(ires,a1,opt1)
>    integer :: a1(:,:)
>    integer, optional :: opt1
>    ires = size (a1, dim=opt1)

For those who wonder (as I did) why using an optional argument is legal:
It is only used as actual argument corresponding to an optional dummy argument.
(cf. 12.4.1.6 in the Fortran 2003 standard).


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org


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

Reply via email to