!=======================================================================
!   FILE: TEST25.F90
!   DATE: 15 November 2000
!
!   TEST: Optional Argument Test
!
!   RESULTS:
!   Digital DF: forrtl: severe (157): Program Exception - access
!               violation. With traceback.
!
!   Lahey F95 - The optional dummy argument (v1) is not associated
!               with actual argument.  With traceback.
!
!
!   Salford FTN95: Error: Reference through missing OPTIONAL argument.
!                  With traceback.
!
!
!   Contact: Mark Stevens                   Salford Software Ltd
!            Adelphi House, Adelphi Street, Salford, M3  6EN, UK
!            Tel: +44 161 834 2454         Fax: +44 161 834 2148
!            mark@salford-software.com
!=======================================================================
 
      program test
          print*, func(1, 2, 3)
          print*, func(v2 = 2, v3 = 3)
 
          contains
              function func(v1, v2, v3) result(res)
                  integer, intent(in), optional :: v1
                  integer, intent(in) :: v2, v3
                  integer :: res
 
                  res = v1 + v2 + v3
              end function func
      end program test
 
 
