1! PR fortran/52370 2! { dg-do compile } 3! { dg-options "-O1 -Wall" } 4 5module pr52370 6contains 7 subroutine foo(a,b) 8 real, intent(out) :: a 9 real, dimension(:), optional, intent(out) :: b 10 a=0.5 11 if (present(b)) then 12 b=1.0 13 end if 14 end subroutine foo 15end module pr52370 16 17program prg52370 18 use pr52370 19 real :: a 20 call foo(a) 21end program prg52370 22