2 ! PR 25217: INTENT(OUT) dummies of derived type with default initializers shall
\r
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 ]
\r
10 character(3) :: s = "abc"
\r
11 real, pointer :: p => null()
\r
19 type(drv), intent(out) :: fb
25 type(drv), intent(out) :: fa
\r
27 if (any(fa%a /= [ 1, 2, 3 ])) call abort()
\r
28 if (fa%s /= "abc") call abort()
\r
29 if (associated(fa%p)) call abort()
\r
38 type(drv), allocatable :: ab(:)
\r
39 real, target :: x = 99, y = 999
\r
41 aa = drv ([ 4, 5, 6], "def", x)
\r
44 aa = drv ([ 7, 8, 9], "ghi", y)
\r
48 ! { dg-final { cleanup-modules "dt subs" } }