aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/pr52370.f90
blob: 66a6fe2b80d3b46be6d64cb78c9debb6867599cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! PR fortran/52370
! { dg-do compile }
! { dg-options "-O1 -Wall" }

module pr52370
contains
  subroutine foo(a,b)
    real, intent(out) :: a
    real, dimension(:), optional, intent(out) :: b
    a=0.5
    if (present(b)) then
      b=1.0
    end if
  end subroutine foo
end module pr52370

program prg52370
  use pr52370
  real :: a
  call foo(a)
end program prg52370