2 ! Tests the fix for PR38602, a regression caused by a modification
3 ! to the nulling of INTENT_OUT dummies with allocatable components
4 ! that caused a segfault with optional arguments.
6 ! Contributed by David Kinniburgh <davidkinniburgh@yahoo.co.uk>
10 character(LEN
=1), dimension(:), allocatable
:: chars
15 if (v_str
%chars(1) .ne
. "a") STOP 1
20 subroutine foo (arg
, flag
)
21 type(ivs
), optional
, intent(out
) :: arg
23 if (present(arg
)) then
24 arg
= ivs([(char(i
+96), i
= 1,10)])