https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91300
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs...@t-online.de --- Comment #4 from G. Steinmetz <gs...@t-online.de> --- Variants that actually compile : $ cat z3.f90 # with a scalar, x(:) -> x module m type t contains procedure :: f => g end type contains subroutine g (z, x) class(t) :: z class(t), optional :: x end subroutine s (z, x) class(t) :: z class(t), optional :: x if ( present(x) ) call z%f(x) end end $ cat z4.f90 # without optional module m type t contains procedure :: f => g end type contains subroutine g (z, x) class(t) :: z class(t), optional :: x end subroutine s (z, x) class(t) :: z class(t) :: x(:) call z%f(x(1)) end end