PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / derived_init_3.f90
blobe1f25aead45175f3bb8fe007c93f8b5a06ed78a7
1 ! { dg-do run }
3 ! PR fortran/40851
5 ! Make sure the an INTENT(OUT) dummy is not initialized
6 ! when it is a pointer.
8 ! Contributed by Juergen Reuter <juergen.reuter@desy.de>.
10 program main
12 type :: string
13 character,dimension(:),allocatable :: chars
14 end type string
16 type :: string_container
17 type(string) :: string
18 end type string_container
20 type(string_container), target :: tgt
21 type(string_container), pointer :: ptr
23 ptr => tgt
24 call set_ptr (ptr)
25 if (associated(ptr)) STOP 1
27 contains
29 subroutine set_ptr (ptr)
30 type(string_container), pointer, intent(out) :: ptr
31 ptr => null ()
32 end subroutine set_ptr
34 end program main