blob: 0f3d409f121006592184dd8027d10f4f78e27c0d [file] [log] [blame]
! { dg-do run }
!
! PR fortran/57596
!
! Contributed by Valery Weber
!
PROGRAM main
IMPLICIT NONE
call get ()
call get2 ()
contains
SUBROUTINE get (c_val)
CHARACTER( : ), INTENT( INOUT ), ALLOCATABLE, OPTIONAL :: c_val
CHARACTER( 10 ) :: c_val_tmp
if(present(c_val)) STOP 1
END SUBROUTINE get
SUBROUTINE get2 (c_val)
CHARACTER( : ), INTENT( OUT ), ALLOCATABLE, OPTIONAL :: c_val
CHARACTER( 10 ) :: c_val_tmp
if(present(c_val)) STOP 2
END SUBROUTINE get2
END PROGRAM main