(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
pr103898.f90
! { dg-do compile }

! This test used to ICE during gimplification (PR103898).

Module g
contains
  function mysize(array, dim)
    integer :: mysize
    integer, dimension(:), intent(in)   :: array
    integer, optional,     intent(in)   :: dim
    if (present(dim)) then
       mysize = size(array, dim=dim)
    endif
  end function mysize
end module