https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87980
--- Comment #6 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