aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr103898.f90
blob: 6b4bb30e10adf8d5a7db3249531dd2bf3c54ad04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { 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