2 ! PR 25217: INTENT(OUT) dummies of derived type with default initializers shall
3 ! be (re)initialized upon procedure entry, unless they are ALLOCATABLE.
4 ! Modified to take account of the regression, identified by Martin Tees
5 ! http://gcc.gnu.org/ml/fortran/2006-08/msg00276.html and fixed with
9 integer :: a(3) = [ 1, 2, 3 ]
10 character(3) :: s
= "abc"
11 real, pointer :: p
=> null()
19 type(drv
), intent(out
) :: fb
25 type(drv
), intent(out
) :: fa
27 if (any(fa
%a
/= [ 1, 2, 3 ])) call abort()
28 if (fa
%s
/= "abc") call abort()
29 if (associated(fa
%p
)) call abort()
38 type(drv
), allocatable
:: ab(:)
39 real, target
:: x
= 99, y
= 999
41 aa
= drv ([ 4, 5, 6], "def", x
)
44 aa
= drv ([ 7, 8, 9], "ghi", y
)